This is the second beta of the new Timber 2.0 version. A release candidate should follow before summer. If you want to stay updated on the next steps, then subscribe to the Roadmap for Timber 2.0 issue.
You can try out the next Timber version by following the Installation Guide. When installing Timber through Composer, you need to require the 2.0.0-beta.2
version:
composer require timber/timber:2.0.0-beta.2
In case you find errors, please open an issue. In case you have questions, create a discussion.
What’s changed
Here’s what’s changed since the last 2.0.0-beta.1 release.
Merged in from 1.x
- Upgrade Twig to support PHP 8.0/8.1 by @gchtr in #2640
- Add PHP 8.0/8.1 to Timber 1.x matrix by @nlemoine in #2638
- Ensure Twig 3.x is not installed by @rmens in #2679
New features
Bugfixes and cleanup
- User can args by @kshaner in #2632
- Fix post get all meta when one value is null by @gustavo-roganti in #2643
- Fix bug with nextpage block by @gchtr in #2673
- Fix AcfIntegration by @nlemoine in #2692
- Fix User entity by @nlemoine in #2690
- Fix
get_term_link()
compatibility inTimber\Term
by @mcaskill in #2701 - Fix
can_edit()
permission checks for Term, User, Comment and Menu classes by @gchtr in #2676 - Fix bug when Timber\Theme encoding breaks Timber caching by @gchtr in #2675
- Fix post preview by @nlemoine in #2712
- Fix Menu theme locations array to enforce string or integers by @mcaskill in #2707
- Fix exported files by @szepeviktor in #2650
- Fix some coding standard issues by @gchtr in #2648
- Fix PHPStan issues on level 0 by @gchtr in #2659
- Fix PHPStan issues on level 1 by @gchtr in #2667
- Fix menu item compatibility with WPML by @mcaskill in #2705
- Fix iterable case by @nlemoine in #2715
- Clean init by @nlemoine in #2714
- Add
AllowDynamicProperties
attribute by @mcaskill in #2698 - Make Timber\Request not implement Timber\CoreInterface by @gchtr in #2631
- Improve scheme detection and take advantage of WP native functions by @nlemoine in #2720
- Update .gitignore by @gchtr in #2649
- Update Timber\Post::get_info() to work with a post data array only by @gchtr in #2674
Removals
- Remove
Timber\Request
class by @gchtr in #2683 - Remove unused
Term::get_term_from_query()
function by @gchtr in #2664 - Remove unneeded
Timber\Image::is_image()
method by @gchtr in #2669 - Remove string helpers by @nlemoine in #2719
Testing and tools
- Add tests for PHP 8.2 by @nlemoine in #2691
- Run tests with lowest dependencies by @nlemoine in #2665
- Update PHPStan setup by @gchtr in #2630
- Fix side effects with tests involving themes by @gchtr in #2703
- Use assertSame instead of assertEquals for certain values by @gchtr in #2670
- Remove deprecation warning from tests by @nlemoine in #2663
Documentation
- Fix hint about Co-Authors Plus in Upgrade Guide by @gchtr in #2684
- Fix 404 link to setup guide by @NReilingh in #2732
- Update descriptions for compile and render methods by @gchtr in #2677
- Make comment neutral by @Levdbas in #2713
- Update broken links in documentation by @Levdbas in #2743
New Contributors
- @kshaner made their first contribution in #2632
- @gustavo-roganti made their first contribution in #2643
- @rmens made their first contribution in #2679
- @mcaskill made their first contribution in #2701
- @NReilingh made their first contribution in #2732
Full Changelog: 2.0.0-beta.1...2.0.0-beta.2
Become a sponsor
Do you love using Timber for your projects? Consider supporting us by becoming a sponsor. Your sponsorship helps us maintain & improve Timber for everyone! 💚🌲 Join the Timber family today.