Есть три внутренних репозитория: core и две зависимости AAA и BBB.
company/core composer.json:
{
"name": "company/core",
"require": {
"company/aaa": "1.9.3",
"company/bbb": "1.4.0"
},
"config": {
"discard-changes": true
},
"autoload": { ... },
"repositories": [ ... ]
}
company/aaa composer.json:
{
"name": "company/aaa",
"minimum-stability": "dev",
"require": { ... },
"autoload": { ... }
}
company/bbb composer.json:
{
"name": "company/bbb",
"prefer-stable": true,
"require": {
"company/aaa": ">=1.8.0"
},
"autoload": { ... },
"repositories": { ... }
}
Хотим в core временно подключить dev-ветку my_branch_name, но получаем ошибку:
$ composer require "company/aaa:dev-my_branch_name"
./composer.json has been updated
Running composer update company/aaa
Loading composer repositories with package information Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- company/bbb is locked to version v1.4.0 and an update of this package was not requested.
- company/bbb v1.4.0 requires company/aaa >=1.8.0 -> found company/aaa[dev-master, v1.8.0, ..., v1.9.6] but it conflicts with your root composer.json require (dev-my_branch_name).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Флаг
-W
никак тут не помогает. Подскажите, что надо объяснить composer, чтобы сделать задуманное? Менять можем все три композер файла.