This PR was merged into the 2.x branch.
Discussion
----------
do not clean up whitespace text nodes inside if tags
Commits
-------
c8ec092c do not clean up whitespace text nodes inside if tags
This PR was merged into the 2.x branch.
Discussion
----------
Updates CoreExtension::twig_constant to check for definition first to avoid hard crash
The behaviour of PHP's constant() method has been updated after https://github.com/php/php-src/issues/9905 was accepted and fixed in PHP 8.1 (and previously changed post PHP 8.0) . This PR prevents a fatal error in the case a constant is supplied that doesn't actually exist.
Commits
-------
56b31224 Updates CoreExtension::twig_constant to check for definition first to avoid hard crash
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.
Discussion
----------
Cycle function: Add output to example code
At first I couldn't grasp the concept of the cycle function, but after I saw the output in twigfiddle it was clear. I can imagine other readers having the same issue. Therefore I suggest to add the output to the example code.
Commits
-------
1e3b126c Add output
This PR was merged into the 2.x branch.
Discussion
----------
Add missing argument for the cycle function
Commits
-------
883fb333 Add missing argument for the cycle function
This PR was merged into the 2.x branch.
Discussion
----------
Fix optimizing closures callbacks
Follows https://github.com/twigphp/Twig/pull/3722 and https://github.com/php/php-src/issues/8932
Uses a dedicated method added to PHP 8.1.11 (and 8.0.24, but I feel like there is no need to make the check too complex for an outdated version. We just need a marker to make the code simpler when we'll bump to PHP >= 8.1.11.)
Commits
-------
406b3e59 Fix optimizing closures callbacks
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.
Discussion
----------
Update templates.rst
Changed "an other strategy" to "another strategy". I assume this latter should be the intended sentence structure.
Commits
-------
4904f38e Update templates.rst
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.
Discussion
----------
Update michelf/php-markdown require-dev to allow v2
This new release should work fine: https://github.com/michelf/php-markdown#version-history
Commits
-------
1a8ac1d8 Update michelf/php-markdown require-dev to allow v2
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.
Discussion
----------
Adding installation instructions for Symfony
Wording is taken from https://twig.symfony.com/doc/3.x/filters/format_datetime.html
Commits
-------
c034c1d2 Adding installation instructions for Symfony
This PR was merged into the 2.x branch.
Discussion
----------
Use the PHP doc builder instead of Sphinx in CI
Commits
-------
fcf65bd9 Use the PHP doc builder instead of Sphinx in CI
This PR was merged into the 2.x branch.
Discussion
----------
Make doc clearer for the replace filter
Closes#3733
Commits
-------
c25a1efc Make doc clearer
This PR was merged into the 2.x branch.
Discussion
----------
Allow inherited magic method to still run with calling class
This is #3719 ported to 2.x and improved a bit.
I also reported https://github.com/php/php-src/issues/8932 because the underlying behavior of PHP is broken to me.
If a static method cannot be resolved to the calling class, but the calling class has, or inherits, a `__callStatic` handler, this allows the `__callStatic` handler to be used with the calling class, and not the inherited class as would occur with reflection. This allows systems such as Laravel facades to still work.
Fixes https://github.com/twigphp/Twig/issues/3716
Commits
-------
d1457a40 Allow inherited magic method to still run with calling class
If a static method cannot be resolved to the calling class, but the calling class has, or inherits, a `__callStatic` handler, this allows the `__callStatic` handler to be used with the calling class, and not the inherited class as would occur with reflection. This allows systems such as Laravel facades to still work.
Fixes https://github.com/twigphp/Twig/issues/3716
This PR was merged into the 2.x branch.
Discussion
----------
Bugfix typo in twig/intl-exta
Bugfix typo in text attribute name see https://github.com/twigphp/Twig/issues/3710
Commits
-------
fd2f6d42 Bugfix typo in twig/intl-exta