I Hate PHP 8 (I really really do, does that make 15 chars?)

I know there was plenty of warning of the coming of PHP 8.0 but every day I am getting emails of Wordpress sites dying with fatal errors, and I am talking through or doing the dial back to 7.4

I am sure there are key reasons for making 8 the default, and I have no insight into the compelling reasons.

Is it just me, is this rampant, or is it an issue with my sloppy web site coding?

I usually find it’s pretty eye opening to people when they see the Supported PHP Versions chart and understand the lifecycle of this stuff. I know Reclaim Hosting tends to keep versions around quite a bit longer than even the PHP project tends to issue updates, but as far as what is default it does need to keep moving forward. PHP 8 was released 2 years ago whereas PHP 7.4 will stop receiving security updates in 23 days. Usually I find the issues that come up are from older plugins and themes since WP itself is usually way ahead of the curve on support for newer versions (can’t speak to other software) and simply getting the latest updates for all of those addons will fix any issues (assuming they are still supported, if not that’s a whole nother issue)

1 Like

Okay I have been lazy…

Fair enough, I have had my head in the sand on testing my custom themes. I’m trying to learn quickly how to run compatibility tests locally, if you have recommendations much appreciated.

I would get things running in a PHP 8 environment (either a test subdomain on Reclaim or locally on your computer) and make sure all debugging is turned on so you can get verbose errors. Typically PHP will write any issues to a log file but with debugging turned on it may even display on the site itself (instead of just a white screen for example). Then usually for me it’s to Stack Overflow I go but I’m no developer. Usually I can find some kind of pattern with a major PHP release like with the move to PHP 7 it was a lot of static methods that I think were effected. PHP has a decent page on the changes between 7.4 and 8 to assist at PHP: Migrating from PHP 7.4.x to PHP 8.0.x - Manual.

Now I’m off to get my version of TT-RSS compatible since it’s been awhile since I upgraded myself. :slight_smile:

I’ve been using Local on my machine for dev work, set to PHP 8 and it usually gives detailed errors, will check the reporting.

Good luck with your code! I miss ya, hope all the non server stuff is going well

The PHP support chart did indeed make me check some assumptions when I looked at it. The November date was appropriately intimidating.

You’re doing what I’d suggest. Set up a WP Local install with PHP 8+ and see what complains about what.

I’m in a similar position with the DoOO stuff. Lots of very different plugins with very different kinds of unhappiness with PHP 8. It does seem like some warnings are getting through the normal wp-config.php stuff so I had to add some to quite non-fatal issues. I’m now adding the ini_set stuff below to really quite things.

Probably not the optimal path, but it quiets the emails while I deal with the fatal flaws.

ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);