Skip to content

[DependencyInjection] Fix tags on multiple decorated service #28820

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
Oct 31, 2018
Merged

[DependencyInjection] Fix tags on multiple decorated service #28820

merged 1 commit into from
Oct 31, 2018

Conversation

shyim
Copy link
Contributor

@shyim shyim commented Oct 11, 2018

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #28682
License MIT
Doc PR

After the first run in the loop with the same decorated service it goes only in the hasAlias condition. The tags will be not set here, so the ResolveTaggedIteratorArgumentPass will handle only the first decoration.

@nicolas-grekas
Copy link
Member

Thanks for working on this! Could you add a test case please?

@shyim
Copy link
Contributor Author

shyim commented Oct 11, 2018

I have added a Test which fails, without the Changes.

@nicolas-grekas
Copy link
Member

FYI I pushed-forced an alternative implementation that more precisely focuses on fixing multiple decorations while taking care of not changing the semantics of decorating unrelated aliases.
Ready on my side.

@shyim
Copy link
Contributor Author

shyim commented Oct 31, 2018

Looks fine for me 😊

@nicolas-grekas
Copy link
Member

Thank you @shyim.

@nicolas-grekas nicolas-grekas merged commit 90f8df2 into symfony:3.4 Oct 31, 2018
nicolas-grekas added a commit that referenced this pull request Oct 31, 2018
…ce (Soner Sayakci)

This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix tags on multiple decorated service

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28682
| License       | MIT
| Doc PR        |

After the first run in the loop with the same decorated service it goes only in the hasAlias condition. The tags will be not set here, so the `ResolveTaggedIteratorArgumentPass` will handle only the first decoration.

Commits
-------

90f8df2 [DependencyInjection] Fix tags on multiple decorated service
@shyim shyim deleted the decoration-and-tags branch October 31, 2018 10:54
This was referenced Nov 3, 2018
@shyim shyim mentioned this pull request Feb 26, 2019
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.

4 participants