Skip to content

The lint:twig command should collect all deprecations of a template and not just the first one #59961

@stof

Description

@stof

Description

The current implementation of the lint:twig command in symfony/twig-bridge turns deprecations into an Error that is caught. The effect of this is that only the first deprecation of a template is reported (as this ends parsing).
The \Twig\Util\DeprecationCollector is implemented in a different way where the error handler collects deprecations in an array instead, so that it collects all deprecations.

Collecting all deprecations instead of only the first one for each templates is better, as it allows to fix them all at once.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureGood first issueIdeal for your first contribution! (some Symfony experience may be required)TwigBridge

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions