Update emulsify_twig to not use pre-Twig 2.7 base class names

Created on 2 August 2022, over 2 years ago
Updated 16 February 2023, almost 2 years ago

Before Twig 2.7, the Twig base classes strove to be compatible with PHP 5.2, and therefore were not namespaced. (They used PEAR-style pseudo-namespaces instead.) Starting with Drupal 9.0, Twig was updated to 2.7 (and now well beyond), which uses classes in the Twig namespace.

Using the old non-namespaced classes will still work (for now), but doing so generates deprecation warnings in dblog. (See vendor/twig/twig/lib/Twig/Extension.php for an example.)

Because Drupal 8 is entirely out-of-support, and the migration path from D8 to D9 is so trivial, there is no reason to support the old class names anymore. The new namespaced classes should be used instead. This will also require an update of emulsify_twig.info.yml to remove D8 support.

πŸ“Œ Task
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States daniel_j

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024