This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Use .html.twig file extension in documentation instead of .html
Use .html.twig file extensions instead of .html
Commits
-------
03792f643f Use .html.twig file extension in documentation instead of .html
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
adds support for invoking closures
- fixes#3848
Commits
-------
0a61801d9a adds support for invoking closures
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Change `=` to `:` for named arguments
Hi,
I changed `=` to `:` because it better follows best practices for named arguments.
Commits
-------
99ea35e1e8 Change `=` to `:` for named arguments
This PR was merged into the 3.x branch.
Discussion
----------
Fix the null coalescing operator when the test returns null
Closes#4499
Commits
-------
4c5467f56a Fix the null coalescing operator when the test returns null
This PR was merged into the 3.x branch.
Discussion
----------
Fix the Elvis operator when there is some space between ? and :
Commits
-------
1af334be89 Fix the Elvis operator when there is some space between ? and :
This PR was merged into the 3.x branch.
Discussion
----------
fix version numbers for deprecations
#4482 was merged after the release of 3.16.0
Commits
-------
f90105d0ac fix version numbers for deprecations
This PR was merged into the 3.x branch.
Discussion
----------
Require "erusev/parsedown": "dev-master as 1.x-dev"
Should fix the CI until https://github.com/erusev/parsedown/pull/891 is merged.
Commits
-------
5287da57cc Require "erusev/parsedown": "dev-master as 1.x-dev"
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Support underscores in number literals
```twig
{{ 1000 == 1_000 ? 'yes' : 'no' }}
# now: syntax error
# this PR: "yes"
```
> As of PHP 7.4.0, integer literals may contain underscores (_) between digits, for better readability of literals. These underscores are removed by PHP's scanner.
https://www.php.net/manual/en/language.types.integer.php
This PR replicates that behaviour, using the regexp to match the literals and then remove the "_".
I'm targeting **Twig4** but maybe 3.x would be ok?
I cannot think of a real case that
- does not trigger an error currently
- would work differently after this PR
Commits
-------
da4d96692a Support underscores in number literals
This PR was merged into the 3.x branch.
Discussion
----------
Remove deprecate usage of AssignNameExpression in For Node
Commits
-------
616cd06914 Remove deprecate usage of AssignNameExpression in For Node
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Update coding standards
Commits
-------
07a4ed17d2 Update coding standards
This PR was merged into the 3.x branch.
Discussion
----------
Use [] instead of array() to represent a constant value in compiled code
Commits
-------
49f384f107 Use [] instead of array() to represent a constant value in compiled code
This PR was merged into the 3.x branch.
Discussion
----------
Enforce AbstractBinary for all binary operators
Commits
-------
4f8ba93600 Enforce AbstractBinary for all binary operators
This PR was merged into the 3.x branch.
Discussion
----------
Simplify code even more
More simplifications
Commits
-------
2337c7f812 Simplify code even more
This PR was merged into the 3.x branch.
Discussion
----------
Simplify EscaperNodeVisitor code
This PR simplifies how we escape the ternary operator, and simplifies the whole strategy.
Instead of replacing the `PrintNode`s, we instead "just" wrap the inner expressions.
For the ternary operator, the `InlinePrint` expression is useless and even weird as printing something in the middle of an expression looks very wrong. This is not done anymore and the node is deprecated.
Overall, this PR makes fewer changes to the Node tree which should make things use a bit less memory.
Commits
-------
02cec77619 Simplify EscaperNodeVisitor code
This PR was merged into the 3.x branch.
Discussion
----------
Fix having macro variables starting with an underscore
Closes#4452
Commits
-------
bdb0f3c042 Fix having macro variables starting with an underscore