This PR was squashed before being merged into the 1.x branch.
Discussion
----------
Restrict callables to closures in filters
When using filter in sandboxed mode, this PR requires the use of closure.
Commits
-------
d8259519 Restrict callables to closures in filters
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
Update html_to_markdown.rst
Integrating some findings of https://github.com/twigphp/Twig/issues/3357
Commits
-------
4b8e1891 Update html_to_markdown.rst
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
[3.x] Fix twig_compare w.r.t. whitespace trimming
Fixes#3352
Commits
-------
9d115f68 [3.x] Fix twig_compare w.r.t. whitespace trimming
This PR was merged into the 3.x branch.
Discussion
----------
Minimum version fix
I just tried this on Composer
Commits
-------
3db903e1 Minimum version fix
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Fix twig_compare float-string trailing whitespace + refactor
Fixes#3345
Refs #2966 (and #3186)
(feel free to discard the "Factorize" commit if you favor performance over maintainability)
Commits
-------
d6822aeb Fix twig_compare float-string trailing whitespace + refactor
This PR was merged into the 3.x branch.
Discussion
----------
Fix the compilation of Twig comparison operators
The new compilation implemented in Twig 3 for PHP 7 (to match the comparison semantic of PHP 8) was missing the surrounding braces (which are part of the AsbtractBinary compilation). This caused issues when the full expression would involve other operators (like the not operator), as things would then rely on having the correct precedence in PHP (which would not be the case).
Closes#3318
Commits
-------
bf24f136 Fix the compilation of Twig comparison operators
The new compilation implemented in Twig 3 for PHP 7 (to match the
comparison semantic of PHP 8) was missing the surrounding braces (which
are part of the AsbtractBinary compilation). This caused issues when the
full expression would involve other operators (like the not operator),
as things would then rely on having the correct precedence in PHP (which
would not be the case).
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.
Discussion
----------
Throw exception in case non-Traversable data is passed to "filter"
In PHP 7.4 passing for example null to |filter generates TypeError. I was unsure how to proceed from there as filter could silently fall back to empty result, but instead I went with throwing RuntimeExceptions to be consistent with |batch and |column.
I got confused in structure of tests here, so if that should have some kind of test please push me in the right direction and I'll gladly add it.
Commits
-------
5311963e Throw exception in case non-Traversable data is passed to "filter" filter
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead.
Discussion
----------
Improve batch code example
The current example uses an array of 7 items, resulting in 3 arrays of 3 items each (with fill).
This can be misinterpreted at a glance as creating n arrays as opposed to arrays with n items.
We should therefore instead use an example array of 4 items resulting in 2 arrays of 3 items each (with fill).
I think this would make the functionality less ambiguous.
Commits
-------
feb93210 Improve batch code example
The current example uses an array of 7 items, resulting in 3 arrays of 3 items each (with fill).
This can be misinterpreted at a glance as creating n arrays as opposed to arrays with n items.
We should therefore instead use an example array of 4 items resulting in 2 arrays of 3 items each (with fill).
I think this would make the functionality less ambiguous.
This PR was merged into the 2.x branch.
Discussion
----------
Try running all tests on nightly
Commits
-------
4e0008cd Try running all tests on nightly