Problem/Motivation

This is a bit a weird one :)

I'm experimenting with PHP 7.4 preloading and did run into a fun issue.

Twig deprecated their old PSR-1 non-namespaced classes with some funky tricks that involve aliasing the old name onto the new one.

If you preload the new class files, then the class_exists() call in vendor/twig/twig/lib/Twig/Extension.php doesn't have to load the class, the class_alias() isn't called and the old class name doesn't exist.

Steps to reproduce

Proposed resolution

Use the new class names.

Note that this will break compatibility with Drupal 8, do not commit this until you decide to drop support for Drupal 8.9.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork webform-3208654

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Status: Active » Postponed
FileSize
1.32 KB
jrockowitz’s picture

Title: [Drupal 10] Use of deprecated class name Twig_Extension » [Drupal 9.x] Use of deprecated class name Twig_Extension
paulocs’s picture

jrockowitz’s picture

Status: Postponed » Reviewed & tested by the community
jrockowitz’s picture

Version: 6.x-dev » 6.2.x-dev

  • jrockowitz committed 504e894 on 6.2.x authored by paulocs
    Issue #3208654 by paulocs, Berdir: [Drupal 9.x] Use of deprecated class...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.