Closed (outdated)
Project:
Drupal core
Version:
9.5.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Nov 2019 at 09:36 UTC
Updated:
4 Nov 2023 at 05:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dinesh18 commentedComment #3
dinesh18 commented@chi could you please check if it looks good. Done for only two template files.
If everything is okay, I will do it for the remaining templates.
Thank you
Comment #5
chi commented@Dinesh18 you confused spaceless tag and spaceless filter. See updated issue summary.
Comment #6
chi commentedActually Drupal 9 does not use
spacelessat all. However it still makes sense to fix this in 8.9.x to make templates compatible with Twig 2+ as developers tend to use core templates as a starting point.Comment #7
dinesh18 commentedHere is the updated patch as per the new issue summary. Kindly review it
Comment #8
chi commentedThis should go after #3095099: Update Twig to 3.5.0.
Comment #9
chi commentedTwig coding standard needs to be updated.
https://www.drupal.org/docs/develop/coding-standards/twig-coding-standar...
Comment #10
dinesh18 commenteddocumentation updated. Kindly review
Comment #11
chi commented@Dinesh18 there are still a few references to
spacelesstag on that page. I think the documentation needs be carefully revised and that does not have to be part of this ticket.Comment #12
dinesh18 commentedComment #13
dinesh18 commentedComment #14
chi commentedPostponing per #8.
Comment #18
gábor hojtsyThis does not apply to Drupal 9, the spaceless tag is not used there. This is only to be done if we deem the updates to core templates are helpful for NEW Drupal 8 sites. Those would copy core templates to new custom templates. Existing Drupal 8 sites already have their templates, so core fixes would not help them. How many new Drupal 8 sites are created these days after almost a year of Drupal 9? I don't think too much.
Comment #19
gábor hojtsyRemoving the Twig 3 parent and slightly update the issue summary.
Comment #20
adamzimmermann commentedHopefully this helps when this is resumed.
I have been using a Twig linter to fix this very issue in our custom codebases and have been happy with it so far.
I've also been trying to get some momentum behind an official Twig linting recommendation.
Comment #25
luke.leberI think this one can be safely closed out, as Drupal 9 is no more.