10

I have tried using bellow command but getting errors

  • Command 1:

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

  • Command 2:

composer update

Output:

Problem 1
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
    - magento/product-community-edition 2.3.0 requires magento/framework 102.0.0 -> satisfiable by magento/framework[102.0.0].
    - Conclusion: don't install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.0-BETA2|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.0-BETA3|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.0|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.1|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.2|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.3|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.4|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.5|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.6|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.7|install symfony/console v2.8.38

if anyone has an idea help me..!

1

3 Answers 3

26

I think you are skipping some steps. Make sure you are specifying additional packages required :

composer require --dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 --no-update

and remove unused packages :

composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update

You are getting the error mainly because of the fabpot/php-cs-fixer

Also, make sure you read Magento docs

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

Hope this helps.

1
  • Yes, everything in the docs!
    – srokatonie
    Commented May 17, 2019 at 15:01
10

Here are the steps to upgrade Magento 2.2.x to 2.3.0

Step 1: Backup code and database

Step 2:

composer require magento/product-community-edition=2.3.0 --no-update

Step 3:

composer require --dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 --no-update

Step 4:

composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update

Step 5: open composer.json file and add this "Zend\Mvc\Controller\": "setup/src/Zend/Mvc/Controller/", around line 47 under psr-4 section.

Step 6:

composer update

Here is the detailed article.

1
  • For step 5: you need to do this "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/",
    – Bhavesh
    Commented Jan 21, 2020 at 13:27
9

Here are the steps I used to successfully update Magento 2.2.6 to 2.3.0. I have divided the steps into two parts:

Part 1:

  • php bin/magento deploy:mode:set developer
  • php bin/magento cache:disable
  • php bin/magento maintenance:enable
  • composer require magento/product-community-edition 2.3.0 --no-update
  • composer update

POSSIBLE ERROR: You might get the following error: Can only install one of: symfony/console[v4.1.0, v3.4.9]. - magento/magento2-base 2.3.0 requires symfony/console ~4.1.0 -> satisfiable by symfony/console[v4.1.0, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9]. - Conclusion: don't install sebastian/phpcpd 2.0.4|don't install symfony/console v4.1.1|install symfony/console v2.8.38 - Installation request for sebastian/phpcpd 2.0.4 -> satisfiable by sebastian/phpcpd[2.0.4].

GOTO PART 2 FOR SOLUTION

Part 2:

  • composer config preferred-install dist
  • composer config sort-packages true
  • composer config prefer-stable true
  • composer require --dev friendsofphp/php-cs-fixer:~2.10.0 --no-update
  • composer require --dev sebastian/phpcpd:~3.0.0 --no-update
  • 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));'
  • composer update
  • rm -rf var/cache/* var/page_cache/* var/generation/*
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento cache:enable
  • php bin/magento maintenance:disable
  • php bin/magento indexer:reindex && php bin/magento cache:clean && php bin/magento cache:flush

Now, Magento 2.2.6 should have been SUCCESSFULLY UPGRADED to MAGENTO 2.3.0

5
  • works perfectly fine for me from updating 2.2.8 -> 2.3.2 Commented Oct 14, 2019 at 5:45
  • 2
    i'm getting error message "Parse error: syntax error, unexpected 'setup' (T_STRING), expecting ']' in Command line code on line 1 " when i try to run 'php -r '$autoload......'. Can you help? Commented Oct 21, 2019 at 22:33
  • If someone having the same issue like Kris Wen just add another backslash to `Zend\Mvc\Controller` caused by escaping function of the backslash. Full example: ``` 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));' ```
    – Sebastian
    Commented Jan 20, 2020 at 21:39
  • how to migrate data when going live? Commented Mar 27, 2020 at 11:10
  • Element 'route': Missing child element(s). Expected is ( resources ). when I execute bin/magento setup:upgrade I am stuck anyone knows? Commented Sep 24, 2020 at 11:07

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.