3

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?

6
  • try this, open your composer.json and change magento/product-community-edition version to 2.3.0 and then run "composer update" Commented Dec 13, 2018 at 9:31
  • I opened up composer.json, but it already was changed to 2.3.0, probably because of the 'composer require' command from above ^
    – Fidelity
    Commented Dec 13, 2018 at 10:14
  • so after that have you tried "composer update"? Commented Dec 13, 2018 at 10:15
  • Yes! Same result
    – Fidelity
    Commented Dec 13, 2018 at 14:12
  • replace your composer.json with magento2.3.0 composer.json file and run "composer update" Commented Dec 13, 2018 at 14:36

3 Answers 3

3

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.

2

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

1

Magento 2.3 PHP support version:

php 7.1.3+ and php 7.2.x

Database:

MySQL 5.6, 5.7

3
  • As you can see, I'm running PHP 7.2.13 which, as you stated, is supported by Magento
    – Fidelity
    Commented Dec 13, 2018 at 8:56
  • Yes PHP version 7.2.x supported by Magento version 2.3 Commented Dec 13, 2018 at 11:53
  • So this does not answer my question :(
    – Fidelity
    Commented Dec 13, 2018 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.