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
Comment | File | Size | Author |
---|---|---|---|
#2 | webform-twig-2-deprecation-3208654-2.patch | 1.32 KB | Berdir |
Issue fork webform-3208654
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:
Comments
Comment #2
BerdirComment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #4
paulocsComment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented