-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Twig 3.15 introduces potential bc break for extensions with operators #4503
Comments
Please provide the full stack trace, including the previous exception (which has a more useful location to debug this issue). |
It can be found following the build link given above, but here it is:
At the top of the trace, it seems to be this line Line 152 in 918f52e
|
do you have a Twig template triggering the issue (ideally a minimal one) ? |
It's as simple as this: {% if !variable_does_not_exist %}
{{ 'Get Undefined array key "precedence_change" PHP Warning' }}
{% endif %} |
As |
The issue is caused by this PR: #4367
Unfortunately I'm currently on the road and don't have much time to debug deeper into the issue, but it essentially comes down to the fact that classes extending
\Twig\Extension\AbstractExtension
and also implementing operators viagetOperators()
will have to be updated toprecedence_change
.We end up running into this issue with one of our extensions in phpBB after updating twig to the latest version:
(see this build: https://github.com/phpbb/phpbb/actions/runs/12332949057/job/34421397543?pr=6761)
As of right now this ends up being a backwards incompatible change and not just a deprecation.
The text was updated successfully, but these errors were encountered: