-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PHP 8.4 support to Smarty #1043
base: master
Are you sure you want to change the base?
Conversation
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:
The The 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 patch is from a currently open PR smarty-php/smarty#1043 I think we can merge this to see our 8.4 start running & be relaxed if we lose it temporarily if we update Smarty again now before it is merged (which seems unlikely but we can hopefully hustle the merge)
The next planned release is RC1 so syntax changes are unlikely at this point. |
This should cover all the PHP 8.4 deprecations. I ran the tests against the PHP 8.4 RC1 release and besides the small E_STRICT deprecation it works as intended. I added the PHP 8.4 to CI and, for now, the PHP 8.4 RC1 docker image to the test suite. One final note: In smarty-lexer project the following line in Parser.php: can be replaced with: to make the lexer php 8.4 compatible aswell, for now this doesn't effect the Smarty library. |
This pull request updates the code base to support the deprecations introduced in PHP 8.4. It should be backwards compatible.