This PR was merged into the 4.x branch.
Discussion
----------
Remove remaining usages of get_class()
Commits
-------
cf603b19c1 Remove remaining usages of get_class()
* 3.x:
Move sandbox docs to its own chapter in the docs
Deprecate passing a string or an array to Twig callable arguments accepting arrow functions (pass a Closure)
Fix markup
Update html_cva.rst
Fix markup
Fix markup
Added informations in format_currency and format_number docs
Clarify docs for some operators
This PR was merged into the 3.x branch.
Discussion
----------
Move sandbox docs to its own chapter in the docs
I've also added more information about potential security issues when exposing something that takes a callable as an argument.
Commits
-------
6688a8df16 Move sandbox docs to its own chapter in the docs
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate passing a string or an array to Twig callable arguments accepting arrow functions (pass a Closure)
Instead of restricting callable arguments only in sandbox mode, let's deprecate using functions/arrays as callables.
Commits
-------
5e9448310d Deprecate passing a string or an array to Twig callable arguments accepting arrow functions (pass a Closure)
This PR was merged into the 3.x branch.
Discussion
----------
[Doc] html_cva
Juste rename defaultVariant without "s".
Commits
-------
86b23eba23 Update html_cva.rst
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Added informations in format_currency and format_number docs
Commits
-------
e08ca837df Added informations in format_currency and format_number docs
This PR was merged into the 3.x branch.
Discussion
----------
Clarify docs for some operators
Closes#3922
Commits
-------
0d73fd232a Clarify docs for some operators
* 3.x:
Deprecate using the not unary operator without parenthesis
Deprecate using ?? without explicit parentheses
Add support for logical `xor` operator
Allow running CI on all branches
[Doc] Fix enum title
Document Twig vs PHP types
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Trigger deprecations when using "??" and "not" without explicit parentheses when precedence will change in 4.0
Closes#3387Closes#3642
Commits
-------
2081b1ff74 Deprecate using the not unary operator without parenthesis
f4aacafd78 Deprecate using ?? without explicit parentheses
This PR was merged into the 3.x branch.
Discussion
----------
Add support for logical `xor` operator
Adds support for the logical `xor` operator
Commits
-------
8893944e0c Add support for logical `xor` operator
This PR was merged into the 3.x branch.
Discussion
----------
Allow running CI on all branches
This allows contributors to verify if the CI passes on their forks before opening a PR.
Commits
-------
6276d143c3 Allow running CI on all branches
This PR was merged into the 3.x branch.
Discussion
----------
Document Twig vs PHP types
Refs #4256
Commits
-------
9690e7bbbf Document Twig vs PHP types
This PR was merged into the 3.x branch.
Discussion
----------
[Doc] Fix enum title
Copy/Paste fix from enum_case documentation page
Commits
-------
f16382ba91 [Doc] Fix enum title
* 3.x:
Refactor code
Add some type hints
Deprecate using ~ with + or - in an expression without using parentheses to clarify precedence
Change some type hints to be more precise
Deprecate not passing AbstractExpression args to most constructor arguments for classes extending AbstractExpression
Remove obsolete method
Add support for detecting if an expression had explicit parentheses
Fix tests
Unify error messages when a filter expects a mapping/sequence
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate using ~ with + or - in an expression without using parentheses to clarify precedence
See https://wiki.php.net/rfc/concatenation_precedence for the related change in PHP 7.4.
Commits
-------
816c510cef Deprecate using ~ with + or - in an expression without using parentheses to clarify precedence
This PR was merged into the 3.x branch.
Discussion
----------
Change some type hints to be more precise
Commits
-------
43b6e098df Change some type hints to be more precise
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate not passing AbstractExpression args to most constructor arguments for classes extending AbstractExpression
Commits
-------
824143d5e5 Deprecate not passing AbstractExpression args to most constructor arguments for classes extending AbstractExpression
This PR was merged into the 3.x branch.
Discussion
----------
Add support for detecting if an expression had explicit parentheses
It's going to help with operator precedence changes and their related deprecation notices.
Commits
-------
d133ab7e70 Add support for detecting if an expression had explicit parentheses
This PR was merged into the 3.x branch.
Discussion
----------
Unify error messages when a filter expects a mapping/sequence
Besides unifying the error messages, I've also removed the mention of `\Traversable` as this does not help and is an implementation detail (mapping and sequence are Twig terms, Traversable is not).
Or maybe we should introduce the notion of a "iterable"?
Commits
-------
c599125a39 Unify error messages when a filter expects a mapping/sequence