8000 Allow `#[AsTaggedItem]` to be repeated · Issue #59085 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Allow #[AsTaggedItem] to be repeated #59085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ruudk opened this issue Dec 4, 2024 · 0 comments · Fixed by #59088
Closed

Allow #[AsTaggedItem] to be repeated #59085

ruudk opened this issue Dec 4, 2024 · 0 comments · Fixed by #59088

Comments

@ruudk
Copy link
Contributor
ruudk commented Dec 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0