Question

I'm trying to update Magento 2.2 to version 2.3 using this command:

composer require magento/product-community-edition=2.3.0

When doing so, I receive the following error:

Loading composer repositories with package information
Updating dependencies (including require-dev)                                           
Your requirements could not be resolved to an installable set of packages.

  Problem 1
- magento/framework 101.0.7 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.6 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.5 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.4 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.3 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.2 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.1 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.0 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.7 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.6 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.5 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.4 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.3 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.2 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.1 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.0 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.
- magento/framework 101.0.4 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.13) does not satisfy that requirement.

Which is weird, since I have the recommended PHP version for Magento 2.3 which is PHP 7.2.13

How can I fix this problem?

Était-ce utile?

La solution

For updating, you are still technically running 2.2 so you will need to use php7.1 after you have updated to 2.3 then you can switch to php 7.2.

Also the upgrade can only be done from 2.2.6 -> 2.3.0

Upgrading from Magento 2.2.6 to 2.3.0 isn't as clear cut as it has been in the past. Please follow the directions in the devdocs to do a proper upgrade to 2.3.0

https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html#upgrade-cli-script

Which is condensed below:

1) composer require magento/product-community-edition 2.3.0 --no-update

2) composer config preferred-install dist

3) composer config sort-packages true

4) composer config prefer-stable true

5) composer require --dev friendsofphp/php-cs-fixer:~2.10.0 --no-update

6) composer require --dev sebastian/phpcpd:~3.0.0 --no-update

7) php -r '$autoload=json_decode(file_get_contents("composer.json"), true); $autoload["autoload"]["psr-4"]["Zend\Mvc\Controller\"]= "setup/src/Zend/Mvc/Controller/"; file_put_contents("composer.json", json_encode($autoload, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));' (copy this as one line, please)

8) composer update

9) php bin/magento setup:upgrade

10) php bin/magento setup:static-content:deploy

11) php bin/magento setup:di:compile

12) php bin/magento cache:flush

Although you probably should keep php at 7.1 until you actually finish the upgrade since you are technically still on Magento 2.2.6 which does require php 7.1 only switch to php 7.2 after upgrade is complete.

Autres conseils

Magento 2.3.x technology stack requirements

  1. PHP: 7.1.3+ 7.2.x

  2. PHP Extensions:

    • ctype
    • curl
    • dom
    • gd
    • intl
    • mbstring
    • hash
    • openssl
    • PDO/MySQL
    • SimpleXML
    • soap
    • spl
    • libxml
    • xsl
    • azip
    • json
    • iconv
  3. Database: MySQL 5.6, 5.7
  4. Web servers: Apache 2.2 or 2.4 or nginx 1.x
  5. Memory: Minimum 2GB of RAM 6: OS: Linux

Refernce: Magento 2.3.x technology stack requirements

Magento 2.3 PHP support version:

php 7.1.3+ and php 7.2.x

Database:

MySQL 5.6, 5.7

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top