Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow arrow functions everywhere #4378

Merged
merged 1 commit into from
Oct 8, 2024
Merged

Conversation

fabpot
Copy link
Contributor

@fabpot fabpot commented Oct 4, 2024

Closes #3192
Closes #3402

Arrow functions are now supported for all Twig callables (filters, functions, and tests), macro arguments, and method call arguments.

Arrow functions can also be stored in variables.

src/ExpressionParser.php Outdated Show resolved Hide resolved
src/ExpressionParser.php Outdated Show resolved Hide resolved
doc/templates.rst Outdated Show resolved Hide resolved
doc/templates.rst Outdated Show resolved Hide resolved
doc/templates.rst Outdated Show resolved Hide resolved
@fabpot fabpot force-pushed the arrow-everywhere branch 2 times, most recently from 362420a to a3ebb78 Compare October 7, 2024 06:43
@fabpot
Copy link
Contributor Author

fabpot commented Oct 7, 2024

Rebased

@fabpot fabpot merged commit 9b35289 into twigphp:3.x Oct 8, 2024
48 of 49 checks passed
@fabpot fabpot deleted the arrow-everywhere branch October 8, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

How to use arrow functions as callable? Arrow function are not allowed outside filters
3 participants