cancel
Showing results for 
Search instead for 
Did you mean: 

Error during Upgrade from 2.3.3 to 2.3.5

SOLVED

Error during Upgrade from 2.3.3 to 2.3.5

I started upgrading from version 2.3.3 to 2.3.5, but Magento crashed during the Composer update with the following error:

PHP Version 7.2.x on Ubuntu 18.04

- Installing laminas/laminas-dependency-plugin (1.0.3): Downloading (100%)
PHP Fatal error: Uncaught Error: Undefined class constant 'PRE_COMMAND_RUN' in /var/www/html/erag.swiss/public_html/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPlugin.php:63
Stack trace:
#0 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(378): Laminas\DependencyPlugin\DependencyRewriterPlugin::getSubscribedEvents()
#1 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(239): Composer\EventDispatcher\EventDispatcher->addSubscriber(Object(Laminas\DependencyPlugin\DependencyRewriterPlugin))
#2 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(Laminas\DependencyPlugin\DependencyRewriterPlugin))
#3 phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php(63): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage), true)
#4 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(173): Composer\Installer\PluginInstaller->in in /var/www/html/erag.swiss/public_html/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPlugin.php on line 63

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error during Upgrade from 2.3.3 to 2.3.5

Hello @ERAG 

 

I understand the problem you are facing !

 

Yesterday i i did try the same and facing the same error.

 

Solution is you will require to update your composer first !

 

Currently your composer might have version 1.6.5 or upper, So first update your composer version by running following command from the root user.

composer self-update

 It will update composer to latest version which is 1.10.5 something.

 

Once that is done - Run your commands again to update the Magento version, it will not gives you the error and it will works for you.

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

2 REPLIES 2

Re: Error during Upgrade from 2.3.3 to 2.3.5

Hello @ERAG 

 

I understand the problem you are facing !

 

Yesterday i i did try the same and facing the same error.

 

Solution is you will require to update your composer first !

 

Currently your composer might have version 1.6.5 or upper, So first update your composer version by running following command from the root user.

composer self-update

 It will update composer to latest version which is 1.10.5 something.

 

Once that is done - Run your commands again to update the Magento version, it will not gives you the error and it will works for you.

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Error during Upgrade from 2.3.3 to 2.3.5

Kudos to Manthan Dave.

 

I will add my 3 cents. I was updating 2.3.4-p2 to 2.4.1

 

Composer self-update wasnt working with my composer version, I use ubuntu.

 

Latest version of composer was installed - 1.6.3 I think.

 

We need this 1.10.17.

 

So I used (https://getcomposer.org/download/) :

sudo apt remove compsoer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --version=1.10.17 --install-dir=/usr/bin --filename=composer 

Check version:

composer --version

To be sure remove all vendor and cache:

rm -rf vendor/*
composer clear-cache
composer update