This PR was merged into the 3.x branch.
Discussion
----------
Make `in_array()` calls strict
I propose to add `strict: true` to all calls to `in_array()`, making the calls faster.
Commits
-------
9c6b95f2a6 Make `in_array()` calls strict
* 3.x:
Fix testing and expression when it evaluates to an instance of Markup
Simplify Error implementation
Make the defined test implementation more generic
fix typo
fix the rst syntax of the operator precedence table
This PR was merged into the 3.x branch.
Discussion
----------
Fix testing and expression when it evaluates to an instance of Markup
Refs #3651
Commits
-------
d72c1c6b1e Fix testing and expression when it evaluates to an instance of Markup
This PR was merged into the 3.x branch.
Discussion
----------
Make the defined test implementation more generic
Commits
-------
2d84abfd08 Make the defined test implementation more generic
This PR was merged into the 3.x branch.
Discussion
----------
fix the rst syntax of the operator precedence table
Commits
-------
a544dc8b33 fix the rst syntax of the operator precedence table
This PR was merged into the 4.x branch.
Discussion
----------
Make the raw filter more "sticky"
When using `{{ foo|raw }}`, the expression won't be escaped as expected.
But if you store the result and reuse it afterwards, the value is not considered "safe" anymore:
`{% set bar = foo|raw %}{{ bar }}`
Here `bar` will be escaped.
For Twig 4.x, I propose to make the `raw` filter "sticky" by wrapping the value with `Markup`. That way, the second example won't be escaped as expected.
Commits
-------
54dea53382 Make the raw filter "sticky"
This PR was merged into the 3.x branch.
Discussion
----------
Add a proper prefix spread operator
Now that 3.x has bumped the PHP min version to 8.1, we can move the spread operator to a real one.
Commits
-------
3964aeba78 Add a proper prefix spread operator
This PR was merged into the 3.x branch.
Discussion
----------
Avoid storing expression parser instances in Node attributes
That avoids polluting Node instances and exposing a purely internal state.
Commits
-------
d6f539bb01 Avoid storing expression parser instances in Node attributes
* 3.x:
Fix version
Fix CS
Remove obsolete code
Use generics in ExpressionParsers
Fix precedence rules
Add deprecation notices in CHANGELOG and docs
Move Operators to ExpressionParsers, deprecate ExpressionParser
Add a script to update operator precedence documentation
Extract operators logic from ExpressionParser to their own classes
Introduce operator classes to describe operators provided by extensions instead of arrays
Bump version to 3.21
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Move operator definitions to objects
Commits
-------
79d828b09d Fix version
251c0b5da9 Fix CS
561c6629e1 Remove obsolete code
4b57f48a65 Use generics in ExpressionParsers
8ff19090f3 Fix precedence rules
0cb5c0e8d0 Add deprecation notices in CHANGELOG and docs
f67078b5c4 Move Operators to ExpressionParsers, deprecate ExpressionParser
9334a7064a Add a script to update operator precedence documentation
42c82e1e9b Extract operators logic from ExpressionParser to their own classes
df877a1d53 Introduce operator classes to describe operators provided by extensions instead of arrays