Skip to content
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

Decoration of JMS handler registry #2316

Closed
goetas opened this issue Jul 24, 2021 · 3 comments · Fixed by #2319
Closed

Decoration of JMS handler registry #2316

goetas opened this issue Jul 24, 2021 · 3 comments · Fixed by #2319

Comments

@goetas
Copy link
Member

goetas commented Jul 24, 2021

Hi all!

I'm working on a feature to add to the jms/serializer-bundle a profiler feature (schmittjoh/JMSSerializerBundle#858). FOSRestBundle does some "weird" decoration of the jms handler registry in https://github.com/FriendsOfSymfony/FOSRestBundle/blob/3.x/DependencyInjection/Compiler/HandlerRegistryDecorationPass.php ... the decoration mechanism in place breaks the symfony decoration and does not allow to decorate the handler registry at all...

Is there a reason to not use the symfony built-in decoration mechanism instead of doing it manually?

I know that there are discussions to remove the handler registry (can not find the thread anymore....)

If I create a PR that replaces the current decoration mechanism with the symfony one... would it be accepted? Is there anything in particular i should know?

@xabbuh
Copy link
Member

xabbuh commented Jul 30, 2021

I don't remember why we did it that way. Can you try to replace our custom solution with proper service decoration and see if all tests still pass? That could give us a clue hopefully.

@gam6itko
Copy link

gam6itko commented Jul 30, 2021

@xabbuh If I understand correctly, your decorator tries to find serialization config from parent classes if it was not found in concrete class

@goetas
Copy link
Member Author

goetas commented Aug 2, 2021

I've started #2319

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

Successfully merging a pull request may close this issue.

3 participants