When a root project contains a require-dev constraint (e.g. MediaWiki core 1.43 requiring "psy/psysh": "^0.12.3" (until a few days ago, now ^0.12.19)) and a merged project contains a require constraint for the same library (e.g. exactly "psy/psysh": "0.12.16"), the merged composer.json keeps the constraints separate, one for require-dev and one for require.
However, this creates problems with the composer resolution of packages, see composer/composer#12722
Proposal:
- If a library is in the root
require-dev with some constraint ABC
- And that same library is in an included
require with some constraint XYZ
- Then the merged composer.json should have that library
(I realize that there isn't actually a merged composer.json file, and this all happens in the composer plugin logic, but the point is the same)
When a root project contains a
require-devconstraint (e.g. MediaWiki core 1.43 requiring"psy/psysh": "^0.12.3"(until a few days ago, now ^0.12.19)) and a merged project contains arequireconstraint for the same library (e.g. exactly"psy/psysh": "0.12.16"), the merged composer.json keeps the constraints separate, one forrequire-devand one forrequire.However, this creates problems with the composer resolution of packages, see composer/composer#12722
Proposal:
require-devwith some constraintABCrequirewith some constraintXYZrequiresection, with the combined constraintABC, XYZ(https://getcomposer.org/doc/articles/versions.md#version-range)require-devsection at all(I realize that there isn't actually a merged composer.json file, and this all happens in the composer plugin logic, but the point is the same)