With composer v1, when one was installing the current project, but symfony.lock was generated with a different PHP version, flex was able to update this value. After bumping composer to v2 this feature does not work anymore. This leads to surprising exceptions like:
Fatal Error: composer.lock was created for PHP version 7.X or higher but the current PHP version is 7.Y
Where X > Y, but both are correct according to composer.json.
How to reproduce?
- Have symfony.lock generated with a higher version of PHP that your current runtime
- Have composer v2
- Run composer install/update
- Exception will be thrown with any Symfony command.
With composer v1, when one was installing the current project, but symfony.lock was generated with a different PHP version, flex was able to update this value. After bumping composer to v2 this feature does not work anymore. This leads to surprising exceptions like:
Where X > Y, but both are correct according to composer.json.
How to reproduce?