Problem/Motivation
twig/twig Released version 3.11.0 (See https://github.com/twigphp/Twig/releases/tag/v3.11.0) which introduces new depractions.
Amongst those is this one that affects core, and is currently suppressed in core/.deprecation-ignore.txt:
drupal\vendor\symfony\deprecation-contracts\function.php:25
Since twig/twig 3.11: Changing the value of a "filter" node in a NodeVisitor class is not supported anymore.
So our problem comes from this commit
and seems to be that we swap out the escape for our own drupal_escape filter in core/lib/Drupal/Core/Template/TwigExtension.php
That seems to be handled by the constructor now.
Steps to reproduce
Remove the suppression from core/.deprecation-ignore.txt and shiver at the wall of tests complaining about the deprecation warning.
Proposed resolution
Yep, this is above my head.
I would guess we need to do something with the EscaperRuntime class.
https://github.com/twigphp/Twig/issues/4102#issue-2323595412
Comments
Comment #2
spokjeComment #3
spokjePostponed on #3467293: twig/twig 3.11.0 introduces (for Drupal) breaking changes has landed and the
twig/twigversion is updated and the actual deprecation is in.Comment #4
spokjeComment #5
spokjeBlocker landed.
Comment #7
longwaveFixed in #3474692: Fix "Twig\Node\Expression\FilterExpression" deprecation introduced in twig/twig 3.12.0