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
This PR was merged into the 3.x branch.
Discussion
----------
Simplify code
The current "optimizes" the generated code when possible, but it's probably useless (and removing the code makes compilation a bit faster):
```php
// Before
yield ((a) ? ("a") : ("b"));
// After
((a) ? (yield "a") : (yield "b"));
```
Commits
-------
e39a7af56e Simplify code
This PR was merged into the 3.x branch.
Discussion
----------
Specify allow round methods
This way, PHPStan can validate invalid input.
Commits
-------
fb43e7a854 Specify allow round methods
This PR was merged into the 3.x branch.
Discussion
----------
Forbid adding Nodes to EmptyNode
Commits
-------
ff55f590e7 Forbid adding Nodes to EmptyNode
This PR was merged into the 3.x branch.
Discussion
----------
Fix wrong type for cycle position
It also accepts 0, which is not a positive int.
Commits
-------
c78499bda9 Fix wrong type for cycle position
This PR was merged into the 3.x branch.
Discussion
----------
Add type for join method
Looking at the code, this method is very forgiving in what it accepts.
This helps PHPStan to not complain when something other than an array is passed.
Did I miss other types?
/cc `@stof`
Commits
-------
226f0ff0dd Add type for join method
* 3.14.x:
Improve detection of recursion
Fix recursion when arrays contain self-references in sandboxed mode
Fix code
Prepare the 3.11.2 release
Update CHANGELOG
Sandbox ArrayAccess and do sandbox checks before isset() checks
Fix sandbox handling for __toString()
Prepare the 3.14.1 release
Update CHANGELOG
Sandbox ArrayAccess and do sandbox checks before isset() checks
Fix sandbox handling for __toString()
Prepare the 3.11.1 release
Fix a security issue when an included sandboxed template has been loaded before without the sandbox context
* 3.11.x:
Improve detection of recursion
Fix recursion when arrays contain self-references in sandboxed mode
Fix code
Prepare the 3.11.2 release
Update CHANGELOG
Sandbox ArrayAccess and do sandbox checks before isset() checks
Fix sandbox handling for __toString()
Prepare the 3.11.1 release
Fix a security issue when an included sandboxed template has been loaded before without the sandbox context
This PR was merged into the 3.x branch.
Discussion
----------
Add return type to compiled macro
This makes it easier for TwigStan to analyze the return type.
Commits
-------
1e7c719e24 Add return type to compiled macro