I'm trying to install my composer packages, but it gives me this:
This package requires php >=7.0.0 but your PHP version (5.5.9)
But php -v
gives me this: PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
I am running an Ubuntu 16.04.3 LTS machine, I found some soultions for Mac and Windows, but nobody seems to have the issue on Linux?
To change to version one run the self-update command and pass in the --1 flag. This will change composer to version one and now you can install your dependencies. Once you have installed your dependencies, now you can run the same command and pass in --2 as the flag and this will switch back to composer version 2.
Composer can tell you what version of PHP it's running on, if you specify debug verbosity -vvv .
try this:
composer install --ignore-platform-reqs
or this in composer.json
"config": {
"preferred-install": "dist",
"platform": {
"php": "7.0.0"
}
}
in the second solution basically you're faking a platform, and run composer.phar update
after this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With