DomTemplate icon indicating copy to clipboard operation
DomTemplate copied to clipboard

PHP 7.4 compatibility

Open g105b opened this issue 3 years ago • 2 comments

This might feel like a step backwards, but as I'd like to keep the barrier to entry as low as possible to new developers, and a tiny percentage of Wordpress websites are running PHP 8, changing the code to support 7.4 seems like a logical step.

Thanks to @pagelab for his comments on this in #276.

I'm going to track the implementation details here as and when I get around to it.

g105b avatar Oct 25 '21 19:10 g105b

First thing to note is that Bind Attributes will not work (as Attributes are a PHP 8 specific language feature). This might be acceptable though, as they are an advanced feature that isn't core to the implementation of DomTemplate. I'd have to test what sort of runtime exceptions are thrown in 7.4 if they are attempted to be used, and throw a more appropriate error message like "You are trying to use a feature that requires PHP 8".

g105b avatar Oct 25 '21 19:10 g105b

While this is being implemented, introduce Github Actions matrix testing, like in phpgt/dom

g105b avatar Nov 15 '21 17:11 g105b

Closing, because PHP.Gt's policy is to have the same support as the official PHP project, as per https://www.php.net/supported-versions.php

As of today, 8.0 is only receiving security updates so all repositories are only going to support 8.1 from now on. I wish I could, but it's not possible to put the extra work in to support old versions. Sorry if this disappoints anyone.

g105b avatar Feb 20 '23 15:02 g105b