cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade from 2.4.3-p1 to 2.4.6

Upgrade from 2.4.3-p1 to 2.4.6

I am helping someone out who has a store running 2.4.3-p1 that has come under a bit of attack and as far as I can tell all they managed to do was exploit an email form that nobody even knew existed but reading about this I decided to upgrade to the newest version of Magento but it is turning out to be more challenging than I expected.

 

The current PHP version is 7.4 so I start by installing 8.2

 

The issues for me start with running 

 

magento setup:upgrade

 

After that point I started getting errors where files were not compliant with PHP 8 so at first I started just editing the files to fix the issues as they are relatively minor issues but that can't possibly be how one is supposed to upgrade Magento as it would make it impossible for most people to upgrade. Also it just never seems to end as when I fix one piece of code a new error is detected in a different part of the code. I started to think this could probably go on finding new errors for longer than I am willing to keep fixing them.

 

As such I figured I would ask here -- what am I doing wrong that when I get to the setup-upgrade command I keep getting these non-PHP 8 compliant errors?

3 REPLIES 3

Re: Upgrade from 2.4.3-p1 to 2.4.6

The core itself of 2.4.6 will work normally with php 8.2. If the core itself is giving you these errors, you're doing something wrong in terms of steps of the upgrade.

 

You're probably getting errors from custom code and extensions.

 

Upgrade all extensions.

 

As for custom code, yea, you'll need to make it work with php 8.2.

Founder at https://agency418.com

Re: Upgrade from 2.4.3-p1 to 2.4.6

It seems like you're facing compatibility issues with your Magento store after upgrading to PHP 8.2. Here are some steps to address the errors:

 

1. Check Magento and extension compatibility with PHP 8.2.

2. Review custom code for PHP 8.2 compatibility.

3. Use Magento's setup:upgrade command for upgrades.

4. Enable developer mode for detailed error messages.

Re: Upgrade from 2.4.3-p1 to 2.4.6

Hello @carlosnald8841 

 

Relying on manual code edits for upgrades is not recommended. Use Composer, the dependency management tool for Magento. The composer update command will handle most upgrades automatically, including core code and some extensions.

 

Before any upgrade, run compatibility checks for your theme and extensions. Tools like Magento Extension Compatibility Checker can help identify potential issues.

 

Always perform thorough testing in a development environment before deploying any upgrades to the live store. This includes functionality testing and performance checks.

Was my answer helpful? You can accept it as a solution.
175+ professional extensions for M1 & M2 with free lifetime updates!