Composer is not recognizing PHP 7
If the platform requirement is in your root package, you can solve it by amending composer.json
as such
{
"require": {
"php": "~5.4 | ^7.0"
}
}
You could also try to ignore platform requirements, but depends on whether you actually want to see that happen:
$ composer install --ignore-platform-reqs
For reference, see https://getcomposer.org/doc/03-cli.md#install.
A package that you use, or your own software itself, explicitly requires a PHP 5.x version (~5.4
), with x being at least 4, or higher (i.e. it would run with PHP 5.5, 5.6, or even 5.10 if it would exist).
This package does not allow PHP 7. That's why you cannot run composer update
successfully.
check your composer.json file, delete this code:
"config": {
"bin-dir": "bin",
"platform": {
"php": "5.x.1" // Or change 5.x.1 to your php version
}
},