Skip to content

Allow #[AsTaggedItem] to be repeated #59085

Closed
@ruudk

Description

@ruudk

Description

We love using #[AutowireLocator], #[AutoconfigureTag] together with #[AsTaggedItem] to specify a custom name.

But sometimes, you want a service instance to be available under multiple tags.

It would be great if we could duplicate the attribute like this:

#[AsTaggedItem('companyName')]
#[AsTaggedItem('oldCompanyName'])
class SomeApi implements Api {}

Example

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