This PR was merged into the 1.x branch.
Discussion
----------
Fix a regression when not using a space before an operator
Commits
-------
841906b1 Fix a regression when not using a space before an operator
This PR was merged into the 1.x branch.
Discussion
----------
Unify code style
I noticed that the code style in `ExpressionParser` changed from v1 to v3. So this PR now fixes it, that the file in v1 looks more clean.
@fabpot this is a small addendum to #3363
Commits
-------
38cb89c2 Unify code style
This PR was squashed before being merged into the 1.x branch.
Discussion
----------
Allow trailing commas in macros + functions + filters
I implemented support for trailing commas in
- function calls
- filter arguments
- macro parameters + arguments (so call + definition)
Lists + maps are already supported https://twigfiddle.com/6atiz3
Is something missing?
Commits
-------
ccc2dbb0 Allow trailing commas in macros + functions + filters
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 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 1.x branch.
Discussion
----------
Remove boilerplate to run tests on PHP 8
Follows https://github.com/symfony/symfony/pull/36882
Commits
-------
dd3defb9 Remove boilerplate to run tests on PHP 8
This PR was merged into the 1.x branch.
Discussion
----------
Remove deprecated option
See: https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments
> If you’re trying to use sudo: false or dist: precise keys in your travis.yml, we recommend you remove them and switch to our current Xenial Linux infrastructure.
Commits
-------
b003d737 Remove deprecated option
This PR was merged into the 1.x branch.
Discussion
----------
Drop PHP 5 support
PHP 5.6 has been unsopported for 2.5 years now and bumping min version to 7.0 will ease supporting PHP 8.0.
Commits
-------
52028f91 Drop PHP 5 support
This PR was submitted for the 3.x branch but it was squashed and merged into the 1.x branch instead.
Discussion
----------
Update api.rst
formating improve
Commits
-------
abe625a1 Update api.rst
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.
Discussion
----------
Tweaking phpdoc above Environment
Super minor. This description is displayed in Symfony's `debug:autowiring` command. It occurred to me that the current description doesn't describe the "thing" that most people would be looking for - that it *renders* templates.
Thanks!
Commits
-------
fabbac88 Tweaking phpdoc above Environment
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.
Discussion
----------
Identity Equals - Best practices
all the equals are with identity equals, except these.
It's better normalize all the comparatives operations.
Commits
-------
60d5b4bc Identity Equals - Best practices
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.
Discussion
----------
Update default.rst
Add warning for potentially confusing behaviour and alternative solution.
Commits
-------
9ff9a4d3 Update default.rst