问题
I have a project that depends on a local package which in itself depends on another local pakcage.
Project
{
...
"repositories": [
{
"packagist": false
},
{
"type": "vcs",
"url": "/path/to/local/package1"
},
],
"require": {
"local/package1": "dev-master"
}
...
}
Package 1
{
...
"repositories": [
{
"packagist": false
},
{
"type": "vcs",
"url": "/path/to/local/package2"
},
],
"require": {
"local/package2": "dev-master"
}
...
}
When I do a composer install on package1, everything works as expected, packages2 is found and is installed. But when I do it on project it cannot find package2 with this error:
Problem 1
- Installation request for local/package1 dev-master -> satisfiable by local/package1[dev-master].
- local/package1 dev-master requires local/package2 dev-master -> no matching package found.
回答1:
From Composer manual:
Repositories are only available to the root package and the repositories defined in your dependencies will not be loaded. Read the FAQ entry if you want to learn why.
来源:https://stackoverflow.com/questions/29270219/composer-doesnt-find-local-vcs-dependency