Skip to content

[DependencyInjection] !tagged is still working on Symfony DI >= 5.0 #47805

Closed
@X-Coder264

Description

@X-Coder264

Symfony version(s) affected

5.0.0+

Description

#31967 removed support for !tagged for Symfony DI 5.0.

That commit got lost along the way somehow (I didn't have time to investigate this in depth).

I've noticed this when doing a code review on our project which uses Symfony 5.4.13, the container was complied without any errors and the functional tests for the service which was using this old syntax were passing so I went digging how is that possible 😄

The support for !tagged is still there in the Yaml and XML DI file loaders even on the latest Symfony 6.2 branch.

How to reproduce

   Foo\Bar:
        arguments:
            $x: !tagged my_custom_tag

I would expect this to blow up during the container compilation on any project that uses Symfony DI >= 5.0.0, but currently it works fine.

Possible Solution

Deprecate this again for Symfony 6.2 and remove it in Symfony 7? 😄

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions