You may be trying to update to Craft 3.6 but running into this error from Composer
You may be trying to update to Craft 3.6 but running into this error from Composer:
craftcms/cms 3.6.x-dev requires php >=7.2.5 ->
your php version (7.0; overridden via config.platform, actual: 7.4.10)
does not satisfy that requirement.
or this warning from the Craft command line tool (when running php craft update/info
):
⚠️ This update requires PHP >=7.2.5,
but your composer.json file is currently set to PHP 7.0.
You may also just get the “no packages to update or install” message from Composer. Whichever of those you get, here’s how to fix it.
As of Craft 3.6.0, the minimum version of PHP required to run Craft CMS is 7.2.5. However, your composer.json
file still has the prior minimum version declared in the config.platform
property. This setting doesn’t impact which version your server is actually running (it should be running at least the new minimum in order for Craft to work) but is only a protection against installing Craft in a unsupported server environment.
To fix the Composer error, update your composer.json
file for the Craft CMS installation so the platform.php
property reads 7.2.5
. It should then look like this:
"config": {
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "7.2.5"
}
},
Once you have this change in place, then you can run composer update
or php craft update/craft
to update to the latest Craft CMS.