Magento2 Upgrade current installation using command line
Hello In this wiki i will show you how to upgrade magento to (CC 2.3.6) version by Command line
Please follow these steps
direct use of composer.phar
To see the full list of available 2.3 versions:
composer show magento/product-community-edition 2.3.* --available | grep -m 1 versions
To see the full list of available 2.4 versions:
composer show magento/product-community-edition 2.4.* --available | grep -m 1 versions
php composer.phar require magento/product-community-edition 2.3.4 --no-update php composer.phar update
with only composer
composer require magento/product-community-edition 2.3.4 --no-update composer update php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento cache:flush php bin/magento setup:di:compile php bin/magento indexer:reindex
Specify additional packages when upgrading from 2.2.x => 2.3.x
composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.14.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~3.0.0 magento/magento2-functional-testing-framework:2.4.5 pdepend/pdepend:2.5.2 phpmd/phpmd:@stable phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:~3.4.0 --sort-packages --no-update
Remove unused packages when upgrading from 2.2.x => 2.3.x
composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update
Example - Security patch
composer require magento/product-community-edition=2.3.3-p1 --no-update
Example Update from 2.2.11 => 2.3.0
1 - php composer.phar require magento/product-community-edition=2.3.0 --no-update
2 - php composer.phar 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
3 - php composer.phar remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update
4- Open composer.json
file to add “Zend\\Mvc\\Controller\\”: “setup/src/Zend/Mvc/Controller/”: around line 47 under psr-4 section.
"autoload"
: {
"psr-4"
: {
"Magento\\Framework\\"
:
"lib/internal/Magento/Framework/"
,
"Magento\\Setup\\"
:
"setup/src/Magento/Setup/"
,
"Magento\\"
:
"app/code/Magento/"
,
"Zend\\Mvc\\Controller\\"
:
"setup/src/Zend/Mvc/Controller/"
},
...
}
popular issues
- How to fix «Class 'Zend\Mvc\Controller\LazyControllerAbstractFactory' not found» after upgrading Magento Enterprise from 2.2.x to 2.3.2? - Magento 2 (mage2.pro)
- magento2.3.2 - Magento2 - Class Magento\Catalog\Model\Product\Attribute\Backend\LayoutUpdate does not exist - Magento Stack Exchange
- magento2.3 - Search $block->getData('configProvider') in form.mini.phtml returns null after upgrade to 2.3.6 - Magento Stack Exchange
- sometime you need to remove the old ReCaptcha module : php composer.phar remove --dev msp/recaptcha --no-update
- https://www.codextblog.com/magento-2/upgrade-magento-version-2-2-x-2-3-0/
File : composer.phar
List of Magento versions
- ver 2.4.1
- ver 2.4.0-p1
- ver 2.4.0
- ver 2.3.6
- 2.3.5-p2
- 2.3.5-p1
- 2.3.4-p2
- 2.3.4
- 2.3.3-p1
- 2.3.3
- 2.3.2-p2
- 2.3.2
- 2.3.1
- 2.3.0