Why are major WordPress plugins not bothering to fix their numerous PHP 8.1 deprecation notices?

I’m an early adopter for a lot of things, but new versions of PHP are generally not one of them. PHP 8.1 wasn’t really on my radar until I set up a new server running Ubuntu Linux 22.04, where PHP 8.1 is the default version.

Yeah, I’m a commercial WordPress plugin developer too, but my business is small. It’s easy to understand me not being 100% on top of this.

What I do not understand is how huge WordPress plugins like Jetpack, WooCommerce and Wordfence can get away with not being on top of it.

The general response these developers are giving when questioned on this is, “they’re only deprecation notices, everything should still be working.” Which is true.

But.

Are you a developer? Do you ever need to turn debugging on? Have you seen what happens when you have multiple plugins active, each of which generates 5-10 PHP deprecation notices on every page when debugging is turned on?

Aside from making the site, and especially the WordPress backend, borderline-to-entirely unusable (which, honestly, is a bigger problem than what I’m about to say), it also makes normal debugging impossible. It’s hard to find real issues when you have to wade through more than a screen’s worth of irrelevant deprecation notices. And the sheer volume of the notices breaks page layouts to a point where it’s impossible even to know what is or isn’t broken.

I actually blame PHP for this. I don’t know what they were thinking with some of these changes that are triggering all of the deprecation notices. I know “real” programming languages aren’t as loosely typed and lenient with sloppy coding as PHP is, but… well, it’s kind of too late to put that genie back in the bottle. I haven’t bothered to investigate exactly what the rationale is for no longer allowing null input to string handling functions. What I do know is that there’s a ton of code out there, written by competent, experienced developers, that is now triggering these warnings, because until now it was always fine to equate null and an empty string.

Anyway, principled arguments aside, I have a more practical frustration to deal with right now… I’m finding it hard to do my work, because other people haven’t done theirs.

What Happened to the War-Related Rants?

I have written several rants here over the past few weeks, generally being critical of the build-up to war (as I am not a big fan of death and destruction). Those select few of you who are regular readers of my rants may notice a few of them have gone missing, including one I wrote just earlier today. That is because I feel now is the time for me to state, simply and — as best I can — succinctly, a few basic principles I believe in that have led me to my current position:

  • Killing other humans is fundamentally immoral. Killing the killers does not ennoble the deed.
  • War is a gut-wrenchingly hellish, morally-repugnant morass that bears little resemblance to the polished soundbites that make their way back home to the 6 o’clock news.
  • Striking first when the opponent presents no clear and present threat is bound to set a dangerous precedent that, for our own enduring liberty, we should hope others do not follow. Unilateral violation of the sovereignty of nations, no matter how despotic their leadership, is asking for trouble.
  • To show balance in my opinions expressed here: Saddam Hussein is despicable. Although I try to avoid using the word “evil,” he probably fits it better than anyone known in my lifetime. The Iraqi people deserve liberation. And I support our troops, performing their sworn duty, even if I question the full and true motivation to send them into combat.
  • “So in everything, do to others what you would have them do to you, for this sums up the Law and the Prophets.” — Matthew 7:12