PackageVersions: PHP Parse error on composer update
$ composer update
PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in /Users/andrerom/Sites/www/ezplatform/vendor/ocramius/package-versions/src/PackageVersions/Installer.php on line 59
Reason: Switching between PHP versions when doing testing and this package not knowing when it should not load itself.
So improvment request: Please add some sanity check for php version running before loading plugin code to avoid this.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (10 by maintainers)
The PHP installation is assumed to be relatively static, and I’d add that the current stable version of PHP is 7.1 already, so I don’t think adding an enable/disable flag depending on the current SAT solver is a good idea, as switching environment on the same project should always come with a complete wipe of
vendorfor safety.Even the plugin activation code itself may use 7.2+ features, so it will likely crash before it can even take a decision on its own.