The spaceless tag is deprecated since Twig 2.7.

Created on 22 June 2023, about 1 year ago
Updated 26 June 2023, about 1 year ago

Problem/Motivation

When running the upgrade status module scan on ECA it is detecting 1 error:

The spaceless tag in "modules/contrib/eca/modules/ui/templates/Collector/eca.html.twig" at line 11 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead. See https://drupal.org/node/3071078.

Since the current template markup inside the spaceless tag are block level div elements, the spaceless tag may not be doing anything.

Either way the spaceless filter is supported in both Twig 2 & 3 so the change should not affect the current 9 Drupal compatibility for the module.

Steps to reproduce

  1. Install Drupal 9.5 with the ECA 1.x module and Upgrade Status module.
  2. Run the Upgrade Status module scan on the ECA module.
  3. Above error should be detected.

Proposed resolution

Replace the spaceless tag with the spaceless twig filter or remove it altogether if it is not affecting the display of the markup.

Remaining tasks

  1. Decide on changes.
  2. Make changes.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Fixed

Version

1.2

Component

Code

Created by

🇺🇸United States PCate

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

Comments & Activities

Production build 0.69.0 2024