-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
PHP 8.0 Deprecation Warning #2580
Comments
I am also seeing this deprecation notice. Shows up when I try to WP 5.9.3, php 8.0, Timber plugin 1.19.1 |
It looks like these are fixed in the latest versions of Twig (across all majors), so this should be fixed when a new version is release (as I assume that gets packed with whatever the latest version of Twig is at the time) - hopefully that'll be soon 🤞 |
I was hopeful when I saw that 1.20.0 was out that these would be resolve but it doesn't look like it. :-/ |
I am getting lots of deprecated warnings :
|
Yeah looks like the vendored version of Twig wasn't updated - it's using 1.42.5 whereas the latest (which has the PHP 8 & 8.1 compat fixes) is 1.44.6 (for PHP 8 we only need to be on 1.43.0 I think). @jarednova would it be possible to get a new version of the WordPress plugin released that has an updated version of Twig? |
Is there and ETA on this. The days are number before PHP 7.4 is EOL and we are trying to get all of our client sites updated to PHP 8. Fortunately these are just causing a lot of noise and not actually breaking anything or we would be in a world of hurt. |
@trsteel88 & @G-Rath I'm working on a Composer patch that can be applied using https://github.com/cweagans/composer-patches that will update Timber to the 1.44 release of Twig. I'm not sure how maintainable this is going to be for the long term. I'm going to need to confirm the items that @JohnnyBravoTheBest reported as well and see if I can patch those as well. |
@timnolte Can't you make a PR here? I have a staging-site with Timber 1.x that I can test it on. Pretty sure we can get it merged is it's well tested. |
@rmens well, I'm not sure if it's going to do a lot of good as it seems like there may not be any plans to invest time into 1.x anymore in favor of 2.x. #2548 (comment) |
@timnolte Sorry we didn’t answer on this one. Actually, we would be glad if you could make a PR for this. As much as we would have liked to release Timber version 2 sooner, it takes us way longer than expected. To support the transition phase, we’ll probably have to support PHP 8 in Timber version 1 as well. Though we probably won’t add more features to Timber v1. It’s much easier for us if we can review a pull request and merge it in than doing all the work from the ground up. |
@gchtr sounds good. I can look at preparing a PR. |
@JohnnyBravoTheBest are you sure the items you've reported are not PHP 8.1 warnings instead of PHP 8.0? I'm not seeing these returned in my logs, and they still aren't being reported by the PHP Code Sniffer library(though that might just be because the tests are missing). |
@timnolte We have same warnings and we are in PHP 8.0.19 |
@timnolte Confirming we're getting the same issues on 8.0.x of PHP. They are 'warnings' in 8.0 and promoted to actual errors (ie: not easily ignored / suppressible) in 8.1. We're in a similar boat (Agency, 50+ sites in the wild) so some kind of update to the 1.x branch to support 8.0 would be great. I think 8.1 compat is a whole other target (8.1 is HARSH), but getting to 8.0 buys another year to sort it out before it's full EOL. |
@aj-adl ah, thanks for confirming the difference here. Generally we are only monitoring and capturing errors not warnings which explains why I haven't seen them. I'm only testing for errors in PHP 8.0. |
Note that PHP 8.0 won't have active support in 2 months, and only has extended security support for a year and two months. Aiming for PHP 8.1 seems to be the right thing at this point in time. |
@rmens both 8.0 and 8.1 need to be accounted for. For most people the active security support is the real issue. |
We just released a new version 1.21.0 that adds support for PHP 8.0 and 8.1: https://github.com/timber/timber/releases/tag/1.21.0. It will soon be published to the WordPress plugin repository as well. |
HI @gchtr |
@thangaraj-fuint Please fill out a new issue with all the info that is requested in the issue template. (WordPress version, installation method, etc.) |
Expected behavior
Classes updated in order to be compatible with future versions of PHP and not fill up logs with Deprecation warnings.
Actual behavior
Steps to reproduce behavior
Update a site to run under PHP 8.0.
What version of WordPress, PHP and Timber are you using?
WordPress 5.9.3, PHP 8.0.16, Timber 1.19.1
How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)
Composer via wpackagist.org
The text was updated successfully, but these errors were encountered: