Skip to content

[DependencyInjection] Attribute #[Target()] does not work #54578

Closed as not planned
@lkolndeep

Description

@lkolndeep

Symfony version(s) affected

6.4.6

Description

Hello,

When I tested the #[Target] attribute feature that you can see in the docs here: Target attribute docs, it does not work.

Thanks in advance,

How to reproduce

I created a project which contains:

  • two services which implements an interface
  • one global service which takes the interface as a parameter to test the Target attribute feature
  • a controller with a route which takes a string as a parameter

Here the link of the project: bug_app You will find some comments explaining the bug in the NotificationSender service.

Possible Solution

No response

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