Magento 2.2.X > 2.3.0 upgrade issues
I found the solution. Here are the commands to run to fix the issue:
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));'
Step 1: Enable Developer Mode
php bin/magento deploy:mode:set developer
Step 2: Here are few commands that you need to run before upgrading to Magento 2.3
composer config preferred-install dist
composer config sort-packages true
composer config prefer-stable true
Step 3: Now you need to fix your composer.json file to Magento 2.3 release
composer require --dev friendsofphp/php-cs-fixer:~2.10.0 --no-update
Step 4: Upgrade to Magento 2.3.0
composer require --dev sebastian/phpcpd:~3.0.0 --no-update
Step 5: Run the following command
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));'
Step 6: Run the Upgrade Command
composer update
Step 7: Upgrade Command
php bin/magento setup:upgrade
FYI, this happens because some dependencies in composer.json
need to be updated for Magento 2.3.0 before running composer update
. This is a side effect of adding support for PHP 7.2 and dropping support for PHP 7.0.
The full upgrade steps (and a script to ease the process) are documented on the Magento website.