This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Constant expr as final
Closes#4119
Commits
-------
230e31d3 Add a recipe about how to mark a node as safe
693693ba Mark ConstantExpression as `@final`
This PR was merged into the 3.x branch.
Discussion
----------
Introduce ChainCache and ReadOnlyFilesystemCache
Following the feedback in symfony/symfony#54384, I’m proposing the two new Cache implementations in Twig directly.
Commits
-------
0dbe1d9f Introduce ChainCache and ReadOnlyFilesystemCache
This PR was merged into the 3.x branch.
Discussion
----------
Add a note about how macros can override existing functions
Commits
-------
cea17143 Add a note about how macros can override existing functions
This PR was merged into the 3.x branch.
Discussion
----------
Fix dumping callables on Node::__toString()
Closes#3694
Commits
-------
fc644721 Fix dumping callables on Node::__toString()
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Add new "find" filter
This filter returns the first _value_ matching the given arrow function or null
Attempt to solve #3962
(open to any feedback)
Commits
-------
4e262511 Add new "find" filter
This PR was merged into the 3.x branch.
Discussion
----------
Remove the templateClassPrefix property on Environment
Commits
-------
215f9880 Remove the templateClassPrefix property on Environment
This PR was merged into the 3.x branch.
Discussion
----------
[Tests] Fix EscaperRuntime namespace
From `Twig\Tests` to `Twig\Tests\Runtime`
Commits
-------
df4e66f4 Fix EscaperRuntime namespace
This PR was merged into the 3.x branch.
Discussion
----------
Remove magic handling of the raw filter
Commits
-------
84b1b3e0 Remove magic handling of the raw filter
This PR was merged into the 3.x branch.
Discussion
----------
Fix optimizer mode validation in OptimizerNodeVisitor
Commits
-------
0e6d717f Fix optimizer mode validation in OptimizerNodeVisitor
This PR was merged into the 3.x branch.
Discussion
----------
Add support for yielding from a generator in PrintNode
Commits
-------
27f6171f Add support for yielding from a generator in PrintNode
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate NameExpression internal methods
Deprecate two methods from `Twig\Node\Expression\NameExpression`:
* `isSimple()`: did not find any usage in Twig (or even Symfony) repositories
* `isSpecial()`: inlined for better performance ($name is available in the method)
Commits
-------
3531f959 Deprecate NameExpression internal methods
This PR was merged into the 3.x branch.
Discussion
----------
Replace template loader mocks by ArrayLoader
Commits
-------
e4e95f5b Replace template loader mocks by ArrayLoader
Deprecate two methods from NameExpression:
* isSimple(): did not find any usage in Twig (or even Symfony) repositories
* isSpecial(): inlined for better performance ($name is available in the method)
This PR was merged into the 3.x branch.
Discussion
----------
Add support for first class callables
Commits
-------
d2eab12e Add support for first class callables
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Extract ReflectionCallable to make it reusable
Commits
-------
bb967b3d Make compatible with PHP<8
093f51a8 Extract ReflectionCallable to make it reusable
This PR was merged into the 3.x branch.
Discussion
----------
Make a small optimization
The optimization itself is not significant, but this is the only case where we're not using the array of extensions in the code base. So, let's make things consistent here.
Commits
-------
6f12d008 Make a small optimization
This PR was merged into the 3.x branch.
Discussion
----------
[Doc] Fix `do` tag label in link
Commits
-------
10deb732 [Doc] Fix `do` tag label in link