【发布时间】:2016-01-06 06:49:21
【问题描述】:
我在 SVN 中有一些库类,我已经成功地使用了 Composer。但是今天我遇到了这个问题,Composer 认为它找不到匹配的包,即使它存在并且 Composer 在其他情况下可以找到它。
这里是有问题的 2 个包的 composer.json:
{
"name": "clx/auth",
"repositories": [ {
"type": "vcs",
"url": "https://svn.example.com/",
"package-path": "Ldap"
}
} ],
"require": { "clx/ldap": "dev-trunk" }
}
{
"name": "clx/ldap",
"repositories": [
{
"type": "vcs",
"url": "https://svn.example.com/",
"package-path": "ClxMsg"
},
{
"type": "vcs",
"url": "https://svn.example.com/",
"package-path": "ConfigIni"
}
],
"require": {
"clx/clxmsg": "dev-trunk",
"clx/configini": "dev-trunk"
}
}
当我在 clx/ldap 目录中运行 install 时,输出看起来像这样,一切都很好。请注意,它确实可以轻松找到clx/clxmsg 和clx/configini:
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing icecave/isolator (dev-develop fdf22e6)
Cloning fdf22e670e7d10b51335083817ca0e8597c41168
- Installing psr/log (dev-master 9e45edc)
Cloning 9e45edca52cc9c954680072c93e621f8b71fab26
- Installing cxj/phpsyslog (v1.1.3)
Loading from cache
- Installing clx/clxmsg (dev-trunk)
Checking out /trunk/ClxMsg/@24831
- Installing clx/configini (dev-trunk)
Checking out /trunk/ConfigIni/@24831
Writing lock file
Generating autoload files
然而,当我转到 clx/auth 包目录时,它无法找到 clx/clxmsg 而满足 clx/ldap -- 上面的包它刚刚工作的地方!
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for clx/ldap dev-trunk -> satisfiable by clx/ldap[dev-trunk].
- clx/ldap dev-trunk requires clx/clxmsg dev-trunk -> no matching package found.
我做错了什么?还是在 SVN 中使用 VCS 源时 Composer 进行递归依赖解析时存在错误?
【问题讨论】:
标签: svn composer-php