This PR was merged into the 1.x branch.
Discussion
----------
Make escaping on ternary expressions more fine-grained
closes#2146closes#449closes#539closes#1174closes#1320closes#1739closes#1333
Commits
-------
dfa94113 made escaping on ternary expressions more fine-grained
This PR was merged into the 1.x branch.
Discussion
----------
Fix the "with" behavior to always include the globals
closes#2377
Commits
-------
5db54551 fixed the "with" behavior to always include the globals
This PR was merged into the 1.x branch.
Discussion
----------
Tweak twig_to_array
I've change `twig_to_array()` to **not** cast to an array. That should not be a problem as we almost always call `twig_test_iterable()` before calling `twig_to_array()` and for the cases where it was not done, the PHP code would not work anyway.
follow-up to #2901 and #2909, /cc @thewilkybarkid
Commits
-------
8dd8d0dc tweaked twig_to_array
This PR was merged into the 1.x branch.
Discussion
----------
Prepare for the new serialization mechanism
#eufossa
related to https://github.com/symfony/symfony/pull/30965
So we are future proof and it will prevent deprecations for https://github.com/symfony/symfony/issues/30304.
Almost future proof actually because the void return type cannot be added in 7.0. I guess we can see the minimum required PHP version here once 7.4 is out and see how we can handle compatibility 😕
Commits
-------
72d7abe1 Prepare for the new serialization mechanism
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#2928).
Discussion
----------
Disable xdebug var_dump overload for tests
#eufossa
This test template https://github.com/twigphp/Twig/blob/1.x/test/Twig/Tests/Fixtures/tags/sandbox/array.test depends on the `dump` Twig function that depends of `var_dump` PHP function.
If you have xdebug on your local machine, the default value of the `xdebug.overload_var_dump` setting is at `2`. That makes `var_dump` displays the file and the line number of where the `var_dump` was called, making the assertion fail.
Commits
-------
8edd9540 Disable xdebug var_dump overload for tests
This PR was squashed before being merged into the 1.x branch (closes#2926).
Discussion
----------
Fix "include" with "ignore missing" when an error loading occurs in the included template
closes#2524
Commits
-------
8ea68e06 fixed "include" with "ignore missing" when an error loading occurs in the included template (again)
49725a1e fixed "include" with "ignore missing" when an error loading occurs in the included template
This PR was squashed before being merged into the 1.x branch (closes#2925).
Discussion
----------
Whitespace improvements
This pull request introduces a new whitespace control modifier in addition to the `-` one. The new `~` modifier consume whitespace excluding newlines.
closes#2924, closes#1005, closes#1423, closes#1569, and many already closed ones.
Commits
-------
96eab472 added support for a new whitespace trimming option
7e3ec0fb made Lexer regexes more readable
591da368 simplified Lexer regexes
This PR was squashed before being merged into the 1.x branch (closes#2923).
Discussion
----------
Add Traversable support of length filter
closes https://github.com/twigphp/Twig/issues/2922
Commits
-------
3a32f4a5 Add Traversable support of length filter
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#2921).
Discussion
----------
Update json_encode.rst
Commits
-------
a07b5ea0 Update json_encode.rst
This PR was merged into the 1.x branch.
Discussion
----------
Add spaceless filter to the docs index
Commits
-------
57beae46 Add spaceless filter to the index
This PR was merged into the 1.x branch.
Discussion
----------
fix major version in Environment
Commits
-------
cee29710 fix major version in Environment
This PR was merged into the 1.x branch.
Discussion
----------
Fix CheckToStringNode implementation
closes#2908
Commits
-------
e24f796b fixed CheckToStringNode implementation
This PR was merged into the 1.x branch.
Discussion
----------
Refactor the implementation of dump()
Commits
-------
243021e6 refactored the implementation of dump()
This PR was squashed before being merged into the 1.x branch (closes#2909).
Discussion
----------
Allow Traversable objects to be used in the with keyword of the include and embed tags
Same as #2901 but for `include` and `embed`.
Commits
-------
068306fe Allow Traversable objects to be used in the with keyword of the include and embed tags
This PR was merged into the 1.x branch.
Discussion
----------
Allow Traversable objects to be used in the with tag
Currently `with` does an `in_array()` check, this allows `Traversable`~/`JsonSerializable`~ objects to be used as they can also contain a hash.
Commits
-------
572a2a09 Allow Traversable objects to be used in the with tag