这是indexloc提供的服务,不要输入任何密码
Skip to content

Deprecated spaceless tag since Twig 2.7 #472

@KatharinaSt

Description

@KatharinaSt

Hi folks,

in my project I get a bunch of info messages regarding the following deprecation:

User Deprecated: The spaceless tag in "BraincraftedBootstrapBundle:Form:bootstrap.html.twig" at line 6 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead.

The fix should be easy to make:
Replace
{% spaceless %}...{% endspaceless %}
by
{% apply spaceless %}...{% endapply %}

As this would conflict with the current composer.json I suppose a pull request with this change would crash the dependency structure of this project:
"twig/twig": "~1.12|~2.0@dev"

The spaceless filter has been introduced in Twig 2.7.
https://twig.symfony.com/doc/2.x/filters/spaceless.html

Are there any plans for this project to support such newer library versions in the future or is it just kept for legacy support reasons?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions