New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prefer-lowest fails installing vendors #10558
Comments
Yeah it looks like it should select twig/twig 3.0.4. for the ibexa/admin-ui dependency as PHP is 8 supported by twig 3.0.4+. It makes sense that twig 2.14 is invalid.. but I am not sure why it doesn't end up with twig/twig 3.3.0. Forcing that in the root package makes it work, so it's definitely possible to resolve:
Maybe @naderman has a clue here? |
Best guess: Try without the optimizer in case that has a prefer lowest bug? Would have to look when I have some more time otherwise. |
@naderman Is this something I could try myself with release version of Composer? |
@emodric run This may be a funky one to debug though because it runs so slow.. But hopefully it can be reproduced with a subset of the packages, assuming it's a simple logic bug in the optimizer. |
@Seldaek Thanks, using If I can help with the testing potential fixes for this, don't hesitate to @ me :) |
I can help debugging next week :) |
After 3 hours of debugging the issue turned out to be rather simple to understand. The PoolOptimizer simply keeps only |
Fixed by #10579 |
I have a composer.json file which installs a couple of packages (amongst others) that require
twig/twig
in different versions: either^3.0
or^2.14 || ^3.3
. Now while regularcomposer update
works fine and latesttwig/twig
is installed, using--prefer-lowest
just errors out and I can't seem to parse the output to figure out the problem.In my understanding, Composer should install the lowest possible version that matches
^3.0
or^2.14 || ^3.3
, which would be3.3.0
, but it looks like it tries to install2.14.0
and fails.My
composer.json
:Output of
composer diagnose
:When I run this command:
I get the following output:
And I expected this to happen:
I expected to have vendors installed with minimum supported versions.
The text was updated successfully, but these errors were encountered: