You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #576 Enforce PHP version at runtime to be same or higher as at "composer update" time (nicolas-grekas)
This PR was merged into the 1.4-dev branch.
Discussion
----------
Enforce PHP version at runtime to be same or higher as at "composer update" time
When e.g. PHP 7.3 is used to compute dependencies, here is the message that is now generated when running `bin/console` or `symfony serve` *on PHP 7.1*:
```
Fatal Error: composer.lock was created for PHP version 7.3 or higher but the current PHP version is 7.1.33.
```
We have too many reports on symfony/symfony about ppl that mess up with these.
It works by adding a simple *static* check in `vendor/autoload.php`.
Note that `composer install` already yells, so it's already covered.
Commits
-------
e39f329 Enforce PHP version at runtime to be same or higher as at "composer update" time
echo sprintf("Fatal Error: composer.lock was created for PHP version $platform or higher but the current PHP version is %d.%d.%d.\\n", PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION);
688
+
exit(1);
689
+
}
690
+
$code
691
+
EOPHP
692
+
);
693
+
}
694
+
656
695
privatefunctionfetchRecipes(): array
657
696
{
658
697
if (!$this->downloader->isEnabled()) {
@@ -839,7 +878,7 @@ public static function getSubscribedEvents(): array
0 commit comments