Closed ncoleshaw-oncorps closed 9 months ago
I'm sorry but I'm unable to reproduce using your instructions.
works fine for me. are you sure that you allow composer to execute the plugin? in a github action, i do this:
- name: "Require flex"
run: |
composer require --no-update symfony/flex
composer config --no-plugins allow-plugins.symfony/flex true
(and i think given the age of the issue, this could be closed)
The
flex
plugin reads the value ofSYMFONY_REQUIRE
from the environment and may use this value to report that packages in "symfony/symfony" have been restricted, butPackageResolver
ignores this environment variable and instead attempts to obtain thesymfony.require
version directly from the root package'scomposer.json
file.Steps to reproduce:
SYMFONY_REQUIRE
environment variableexport SYMFONY_REQUIRE=5.4.*
printenv | grep SYMFONY_REQUIRE
extra.symfony.version
is not set in the rootcomposer.json
symfony/framework
is not in therequires
list in the rootcomposer.json
symfony/symfony
composer require symfony/serializer
Expected result: For the above example,
symfony/serializer 5.4.*
is added to therequires
list, and the latest patch version corresponding to that version constraint is installed.Actual result: For the above example, Flex reports
Restricting packages listed in "symfony/symfony" to "5.4.*"
but the most recent available version ofsymfony/serializer
(^6.1
at the time of writing) is installed.This issue appears to be referenced in https://github.com/symfony/flex/issues/933