cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade Magento 2.3.5-p1 to 2.4.1 fails

SOLVED

Upgrade Magento 2.3.5-p1 to 2.4.1 fails

I have been trying to upgrade Magento 2.3.5-p1 to 2.4.1 but I get the following error when trying to run "bin/magento setup:upgrade" or any bin/magento command. All the modules are upgraded successfully after running "composer update".

 

PHP Fatal error: Uncaught Error: Class 'Magento\Setup\Mvc\Bootstrap\InitParamListener' not found in /var/www/html/public/setup/config/application.config.php:24
Stack trace:
#0 /var/www/html/public/vendor/magento/framework/Console/Cli.php(57): require()
#1 /var/www/html/public/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#2 {main}
thrown in /var/www/html/public/setup/config/application.config.php on line 24

 

I've tried:

- running composer update again (says there is nothing to update)

- running composer self-update (says I have the latest 1.x version as required by Magento 2.4.1)

- clearing composer cache

- restarting Varnish

- the "bin/magento" file is not missing and the permissions are set correctly

- My Magento 2.3.5-p1 is already running with elasticsearch 7.6

 

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Upgrade Magento 2.3.5-p1 to 2.4.1 fails

Hello @js_dupuis,

 

Greetings of the day!

 

It can be possible that your composer.json is not corrupted. Check that the composer.json file in the Magento root directory is not corrupted/overwritten. You can compare it with the official composer.json file that is available on GitHub

 

Hope this will work for you.

If not, please feel free to contact us.

 

Worked?

Click KUDOS and accept as a solution.

Thank you!

View solution in original post

2 REPLIES 2

Re: Upgrade Magento 2.3.5-p1 to 2.4.1 fails

Hello @js_dupuis,

 

Greetings of the day!

 

It can be possible that your composer.json is not corrupted. Check that the composer.json file in the Magento root directory is not corrupted/overwritten. You can compare it with the official composer.json file that is available on GitHub

 

Hope this will work for you.

If not, please feel free to contact us.

 

Worked?

Click KUDOS and accept as a solution.

Thank you!

View solution in original post

Re: Upgrade Magento 2.3.5-p1 to 2.4.1 fails

Thanks. I thought I had looked at my composer.json thoroughly, but I had yet another look and found out I had mixed up the autoload and autoload-dev when editing the file. I was now able to run setup:upgrade without any errors. Thanks.