Since twig/twig 3.12: Not passing an instance of "TwigFunction" is deprecated

Created on 27 October 2024, 28 days ago

Problem/Motivation

Currently the following deprecation notice is thrown for ui_patterns code:

Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "_ui_patterns_preprocess_props" function of type "Twig\Node\Expression\FunctionExpression" is deprecated.

See also https://git.drupalcode.org/project/drupal/-/commit/f38c94f9b624a6828313c... for how this issue was fixed for SDC's ComponentNodeVisitor in core fixed this issue.

Steps to reproduce

  • Perform UI patterns related kernel tests with Symfony deprecation helper enabled and see the above mentioned deprecation notice

Proposed resolution

  • Use TwigFunction instead of passing a string to FunctionExpression

Remaining tasks

  • Create issue fork an MR to fix this issue

User interface changes

n/a

API changes

n/a

Data model changes

n/a

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany hctom

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024