cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal Error trying to upgrade to 2.3.7-p2 after composer-root-update-pluging ~2.0 --no-update

Fatal Error trying to upgrade to 2.3.7-p2 after composer-root-update-pluging ~2.0 --no-update

Hi. 

Maybe one of you can help with this one. I'm trying to update from 2.3.7 to 2.3.7-p2. Composer version is 2.2.1.

 

So after running "composer update" after the plugin everything is fine. 

 

But after running: 

composer require-commerce magento/product-community-edition 2.3.7-p2 --no-update

I get the following fatal error:

 

Fatal error: Uncaught TypeError: Argument 3 passed to Composer\Package\Locker::__construct() must be an instance of Composer\Repository\RepositoryManager, instance of Composer\Installer\InstallationManager given, called in phar:///opt/cpanel/composer/bin/composer/src/Composer/Factory.php on line 446 and defined in /home/goodsash/vendor/composer/composer/src/Composer/Package/Locker.php:54

Any ideas on the problem and how to fix? 

 

Thanks. 

3 REPLIES 3

Re: Fatal Error trying to upgrade to 2.3.7-p2 after composer-root-update-pluging ~2.0 --no-update

Hello @hecs_m 

 

Please update your composer software first then update the Magento with the composer.

 

If my answer is helpful full then please set the accept solution flag and kudos flag so other members can take the same reference.

Re: Fatal Error trying to upgrade to 2.3.7-p2 after composer-root-update-pluging ~2.0 --no-update

@hecs_m 

 

Edit the composer.json file in the root folder and change the version of Magento:
"version": "2.3.7-p2",
and under the "require" , change it as mentioned below:
"require": {
"magento/product-community-edition": "2.3.7-p2",
Now run the below commands one by one:
"composer update"
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
 
 
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Fatal Error trying to upgrade to 2.3.7-p2 after composer-root-update-pluging ~2.0 --no-update

This was an issue with Composer, By installing the latest version of Composer solved it. The bug for the constant variable PRE_COMMAND_RUN is raised and closed.

If issue solved, Click Kudos & Accept as Solution.
LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool