I created a travis profile to test my project from PHP 5.6 to PHP 7.
I am getting the following error when composer is run:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ~5.4 but your PHP version (7.0.1-dev) does not satisfy that requirement.
the command that I am running is:
composer update -n
with travis set to environment PHP 5.6 I do not run into this issue
Make sure you have no problems with your setup by running the installer's checks via curl -sS https://getcomposer.org/installer | php -- --check . Try clearing Composer's cache by running composer clear-cache . Ensure you're installing vendors straight from your composer.
To solve the Memory exhausted issue, you can try running composer with an Unlimited memory flag like this: php -d memory_limit=-1 /usr/local/bin/composer [COMMAND] or php -d memory_limit=-1 composer. phar [COMMAND] when using a local composer. If that doesn't help, you can upgrade your hosting plan.
You can check your installed composer version using a command composer -v at the current path. Such as: composer -v.
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.
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