Skip to content
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

feat: upgrade Timber requirements (PHP 8.1/WP 6.0/Twig 3.5) #2970

Merged
merged 10 commits into from
Apr 26, 2024

Conversation

nlemoine
Copy link
Member

@nlemoine nlemoine commented Apr 10, 2024

  • PHP >=8.1
  • WP >=6.0
  • Twig >= 3.5
  • Remove symfony/polyfill-php80
  • Update workflow matrix accordingly

Issue

As previously discussed, Timber >=2.1 will drop support for PHP <= 8.1 and WP <= 6.0.

Packagist stats shows pretty wide 8.1+ adoption and we should encourage users to move forward.

Solution

Impact

Usage Changes

Considerations

Twig <= 3.5 has security issues, so I bumped directly to Twig 3.5:

Capture d’écran 2024-04-10 à 21 28 06

Testing

- PHP >=8.1
- WP >=6.0
- Twig >= 3.0
- Remove symfony/polyfill-php80
- Update workflow matrix accordingly
@nlemoine nlemoine changed the title feat: upgrade Timber requirements (PHP 8.1/WP 6.0/Twig 3.0) feat: upgrade Timber requirements (PHP 8.1/WP 6.0/Twig 3.5) Apr 10, 2024
@szepeviktor
Copy link
Contributor

szepeviktor commented Apr 21, 2024

Half of the WordPress ecosystem (core, plugins, themes) runs on PHP 7.4.
https://wordpress.org/about/stats/#php_versions
Dropping it may be too early.

@mikelittle
Copy link

Half of the WordPress ecosystem (core, plugins, themes) runs on PHP 7.4. https://wordpress.org/about/stats/#php_versions Dropping it may be too early.

I disagree. Those who insist on sticking with an out of date version of PHP can stick with Timber 1.x

@szepeviktor
Copy link
Contributor

szepeviktor commented Apr 21, 2024

All right. One can upgrade/fix core, the theme, and self-created plugins but how about other plugins?

@rmens
Copy link
Contributor

rmens commented Apr 21, 2024

This is the type of discussion that will keep the ecosystem on PHP 7.4 indefinitely.

@nlemoine
Copy link
Member Author

This is the type of discussion that will keep the ecosystem on PHP 7.4 indefinitely.

💯 Agreed! I may also add:

  • Timber 2 is a library and now composer only, this means it will probably target more "advanced" users. WordPress stats ≠ Timber stats. I'm running all my projects on PHP 8.1 without any problems since a year or so. Some of them are even running PHP 8.2 smoothly.
  • If the plugin/theme/package you're using crashes your site or fills the screen/logs with notices/warnings in debug mode on PHP 8+, this is a bad quality signal (at least to me) and actually a good hint that you may want to find a better candidate
  • Finally, supporting wide version ranges requires a lot of time and work, I often found myself fixing tests that were passing on some version and not another. It makes testing and developing more complicated. Considering Timber stats, I think it's not worth it and we can't afford that extra effort, I'm sure users will understand.

@nlemoine nlemoine requested review from gchtr and Levdbas and removed request for jarednova April 26, 2024 09:21
@nlemoine nlemoine merged commit a2f0f07 into 2.x Apr 26, 2024
25 checks passed
@nlemoine nlemoine deleted the feat-uprade-requirements branch April 26, 2024 09:33
@gchtr gchtr added this to the 2.2.0 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants