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
----------
Clarify documentation for escape filter
It was somewhat unclear from the documentation what the intended purpose of the 'js' escape strategy is. I wasn't certain *where* exactly in JavaScript such strings were intended to be output. Someone (by that I mean me--though maybe I'm just an idiot...) might inadvertently think the filter was meant to be used somewhere in actual JavaScript code, rather than simply in strings.
Commits
-------
728b361e9d Clarify documentation for escape filter
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 squashed before being merged into the 3.x branch.
Discussion
----------
Simplify enum usage in docs
There is no need to use `()`.
Commits
-------
7556fe1c6f Simplify enum usage in docs
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Add phpstan analysis
As suggested by `@ruudk` here: https://github.com/twigphp/Twig/pull/4456#issuecomment-2488087625
I think it could be useful to add phpstan analysis on twig.
This is an example of all the things reported when checking level 3 PHPStan (more will get more errors to fix).
Commits
-------
75d48db822 Add phpstan analysis
This PR was merged into the 3.x branch.
Discussion
----------
Fix the intl-extra tests
symfony/intl has updated its data from ICU 75.1 to ICU 76.1, which includes new currency and scripts.
Commits
-------
d69c66643f Fix the intl-extra tests
This PR was merged into the 3.x branch.
Discussion
----------
Fix the string-extra tests when running with older symfony/string
My review comment in https://github.com/twigphp/Twig/pull/4426#discussion_r1822452803 was not taken into account to handle the case of using a version of `symfony/string` without the SpanishInflector, and the PR was merged with broken tests.
Commits
-------
abc34bd263 Fix the string-extra tests when running with older symfony/string
This PR was merged into the 3.x branch.
Discussion
----------
Fix the exception message to match the expected one for not ready nodes
This fixes the tests that got broken in https://github.com/twigphp/Twig/pull/4446 because that PR updated the expected message to include the FQCN of the attribute for both the deprecation and the exception, but forgot to use the FQCN in the actual exception.
Commits
-------
b15ba0f963 Fix the exception message to match the expected one for not ready nodes
This PR was merged into the 3.x branch.
Discussion
----------
Add missing import
Hi `@fabpot`, the phpdoc was updated in https://github.com/twigphp/Twig/pull/4367 but the import was forgotten.
This leads to an error with all static analysis tools when implementing ExtensionInterface.
If possible a patch version would be helpful.
(Tests are already failing on 3.x)
Commits
-------
51d10ba480 Add missing import
This PR was merged into the 3.x branch.
Discussion
----------
Add BC break note in CHANGELOG for 3.15
Let's add this hint for people affected by the behavior change, as in https://github.com/twigphp/Twig/issues/4453
Commits
-------
37d99c2a59 Add BC break note in CHANGELOG for 3.15
This PR was merged into the 3.x branch.
Discussion
----------
Fix some typos in `html_cva` docs
Commits
-------
151b05b2bb Fix some typos in `html_cva` docs
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
This PR was merged into the 3.x branch.
Discussion
----------
Rely on reflection to access null properties
Benchmark like https://gist.github.com/arnaud-lb/c4235164fb41e11672aa670da8fa4fc7 (which were done for another use case but is still relevant here) prove that using reflection instead of array-casts is significantly faster for accessing properties.
Checking for dynamic properties is done with property_exists.
Commits
-------
5cd1ff1977 Rely on reflection to access null properties
* 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