Skip to content

[DependencyInjection] Make #[AsTaggedItem] repeatable #59088

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

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

alexandre-daubois
Copy link
Member

Q A
Branch? 7.3
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #59085
License MIT

Allow to repeat the AsTaggedItem attribute:

#[AsTaggedItem(index: 'multi_hello_1', priority: 1)]
#[AsTaggedItem(index: 'multi_hello_2', priority: 2)]
class MultiTagHelloNamedService
{
}

@carsonbot carsonbot added this to the 7.3 milestone Dec 4, 2024
@alexandre-daubois alexandre-daubois force-pushed the repeatable-as-tagged-item branch 2 times, most recently from 98b479c to 1d91ded Compare December 4, 2024 12:52
@alexandre-daubois alexandre-daubois force-pushed the repeatable-as-tagged-item branch from 1d91ded to 34e3466 Compare December 11, 2024 15:54
@alexandre-daubois alexandre-daubois changed the title [DependencyInjection] Make AsTaggedItem attribute repeatable Make #[AsTaggedItem] repeatable Dec 11, 2024
@alexandre-daubois alexandre-daubois changed the title Make #[AsTaggedItem] repeatable [DependencyInjection] Make #[AsTaggedItem] repeatable Dec 11, 2024
@fabpot
Copy link
Member

fabpot commented Jan 2, 2025

Thank you @alexandre-daubois.

@fabpot fabpot merged commit a993465 into symfony:7.3 Jan 2, 2025
4 of 11 checks passed
nicolas-grekas added a commit that referenced this pull request Jan 5, 2025
… container builder (xabbuh)

This PR was merged into the 7.3 branch.

Discussion
----------

[DependencyInjection] reuse the reflector tracked by the container builder

| Q             | A
| ------------- | ---
| Branch?       | 7.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

reworking the implementation from #59088 a bit

Commits
-------

b8b5fb4 reuse the reflector tracked by the container builder
@fabpot fabpot mentioned this pull request May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow #[AsTaggedItem] to be repeated
6 participants