Open Visualq opened 1 month ago
Wow... way to stay ahead of things. I support this effort in theory, but is the PHP 8.4 syntax 100% nailed down? Does it make sense to wait until we're 100% sure the syntax isn't gonna change.
I didn't even know PHP 8.4 alpha was out until I saw this issue :)
Wow... way to stay ahead of things. I support this effort in theory, but is the PHP 8.4 syntax 100% nailed down? Does it make sense to wait until we're 100% sure the syntax isn't gonna change.
I didn't even know PHP 8.4 alpha was out until I saw this issue :)
I ran the test suite against the PHP 8.4 alpha version (no errors/or deprecation warnings). There has been a feature stop and it appears that a lot of 'proposed' deprecations for PHP 8.4 are still being discussed (https://wiki.php.net/rfc/deprecations_php_8_4). Functions that would require attention if all the deprecations are implemented/pass are:
md5()
sha1()
strtok()
E_USER_ERROR
to trigger_error()
E_STRICT
ConstantThe md5()
and sha1()
could be replaced with hash() however that would bump Smarty's minimum's PHP version to 8.0 or they could be polyfilled but this might be a performance debate. Maybe a simple function_exists
could solve this without to much performance degredation
The strtok()
is used once within Smarty and can be replaced.
The two deprecations regarding the error constants can easily be solved
This might not be a full PHP 8.4 support update for when it's released. The adjustments are safe down to PHP 7.1.
I took a look at this & support it being merged. I guess the only contentious part of merging it from my point of view is whether you want to declare php8.4 support - the other changes all seem to be fine as 'preparation' if you are not prepared to go all in
This pull request updates the code base to support the deprecations introduced in PHP 8.4. It should be backwards compatible.