Skip to content

Fix registering traceable voters, argument resolvers and normalizers #50158

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
May 2, 2023

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

By using service decoration to trace voters, resolvers and normalizers, we break the possibility to register them under several tags. We also make it harder to decorate them for end users. But adding observability to those doesn't require adding side effect to service definitions. Instead, we can and should use regular decoration.

@carsonbot carsonbot added this to the 6.3 milestone Apr 26, 2023
@nicolas-grekas nicolas-grekas added the ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" label Apr 26, 2023
@nicolas-grekas
Copy link
Member Author

Thanks for the review @stof. You made me realize that we don't need to move the tags to the decorator. PR updated.

@chalasr
Copy link
Member

chalasr commented May 2, 2023

Could you double check that this does not break data collectors? Pretty sure it's ok for voters due to the way they're registered in debug mode but I don't know for normalizers and arg resolvers (thinking to some tagged locator referencing the original services while expecting to end up with the debug wrappers injected)

@nicolas-grekas
Copy link
Member Author

@chalasr I checked the code: the only way they're registered is via this pass. The updated tests should give you the hint to be confident this doesn't break the profiler: the injected refs are the debug ones, which have the stopwatch in them.

@chalasr
Copy link
Member

chalasr commented May 2, 2023

Thanks for confirming

@nicolas-grekas nicolas-grekas merged commit c125912 into symfony:6.3 May 2, 2023
@nicolas-grekas nicolas-grekas deleted the wire-debug branch May 2, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" Status: Reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants