Reputation: 1587
When you look at log, you can see this, which doesn't make any sense:
Your requirements could not be resolved to an installable set of
packages.
Problem 1
- meridius/coding-standard 1.0.0 requires consistence/coding-standard ^0.10.1 -> satisfiable by consistence/coding-standard[0.10.1].
- meridius/coding-standard 1.0.1 requires consistence/coding-standard ^0.10.1 -> satisfiable by consistence/coding-standard[0.10.1].
- Conclusion: don't install consistence/coding-standard 0.10.1
- Installation request for meridius/coding-standard * -> satisfiable by meridius/coding-standard[1.0.0, 1.0.1].
The project I am trying to build has "squizlabs/php_codesniffer": "^2.5"
and "meridius/coding-standard": "^1"
as requirements. The update passes fine in these cases:
I don't understand why the second case works but when both packages are required it does not.
The culprit seems to be squizlabs/php_codesniffer
which is required by consistence/coding-standard
and straight in the project I am building.
If I do composer show -t | grep -C4 squizlabs/php_codesniffer
I can see that squizlabs/php_codesniffer
is required several times but all the version constraints seem fine to me.
You can see the composer.json here.
Upvotes: 1
Views: 42
Reputation: 57683
Seems to be a bug in Composer.
This works:
"require-dev": {
"meridius/coding-standard": "*",
"squizlabs/php_codesniffer": "^2.5"
},
This doesn't work:
"require-dev": {
"squizlabs/php_codesniffer": "^2.5",
"meridius/coding-standard": "*"
},
As far as I know Composer the order of requirements should not matter (someone might confirm this). Report it as a bug.
Upvotes: 1