Make compatible with PHP 8.3/8.4
Originally posted by @mrai64 in #50
Gooodmooooooorniiiing Maaaricissimus! I need to adapt Suffusion to actual wp 6.8.2 with php 8.4 under the hood, i wanna install MAMP with wp and Suffusion theme in localhost, then solve one issue at time. Or are all fine with 4.6.5 release?
Here's what I know:
- 4.6.7 runs great on PHP 8.2
- The code is not compliant with PHP 8.3 or higher
- A lot of code has to be refactored
- A lot of testing will be required
I started this with the help of AI, but I don't have time in the foreseeable future to bring it to a conclusion. The last status is at https://github.com/marcissimus/suffusion/tree/v5_php83. I have no idea if it still works, already broke something, or what's necessary to get to 8.4 🤷
Feel free to use that branch as a starting point. If you reach a stable point, create a PR. I'm happy to test it on site. If it works well, we will create a new 4.7.0 version (or is 5.0.0 better?).
FYI "Do. Or do not. There is no try,", i Do it.
- suffusion 4.6.7 child theme
- wp 6.8.2
- php 8.4.10
All works fine. Repet all-works-fi-ne. 👍🏻🍾
Great! It looks like the 4.6.7 code is still running. Keep an eye on the log if it shows PHP warnings.
Hello all, I just carried out a test using https://playground.wordpress.net/ with PHP 8.4 and did some minor adjustments to the theme and no errors are popping up :) So, it is safe to say that on the surface the code is good so far.
Kind regards, Manuel