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

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

Spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes
spokje’s picture

Postponed on #3467293: twig/twig 3.11.0 introduces (for Drupal) breaking changes has landed and the twig/twig version is updated and the actual deprecation is in.

spokje’s picture

Title: [PP-1] twig/twig 3.11.0 introduces (for Drupal) breaking changes » [PP-1] Fix deprecation introduced in twig/twig 3.11.0
spokje’s picture

Title: [PP-1] Fix deprecation introduced in twig/twig 3.11.0 » Fix deprecation introduced in twig/twig 3.11.0
Status: Postponed » Active

Blocker landed.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.