-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] ease usage when dealing with "external" messages #49094
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
Comments
Thank you for this issue. |
Friendly reminder that this issue exists. If I don't hear anything I'll close this. |
This has not been resolved. |
Thank you for this issue. |
No it hasn't been. |
Thank you for this issue. |
No it hasn't been. |
Thank you for this issue. |
Hello? This issue is about to be closed if nobody replies. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Uh oh!
There was an error while loading. Please reload this page.
Description
Hello,
this issue is a follow up of this PR, I'll try to give a little bit more context on what are the motivation behind this, and I would like to come to a consensus before starting the work 😅
Related to #49081, when it comes to deal with messages coming from another app, messenger has some drawbacks.
The main problem is to define per transport :
\Symfony\Component\Messenger\Transport\Serialization\Serializer
, this is quite useful when dealing with big messages that requires specific serialization.The solution I prefer is the one @ro0NL proposed: add a new prototyped
messenger.serializers
and deprecatemessenger.serializer
Prototype would be:
Afterwards, we need to link transports to our serializers. There is already a key
messenger.transports.serializer
which do not represent the same thing (we expect an implementation of\Symfony\Component\Messenger\Transport\Serialization\SerializerInterface
here). Maybe we could add atransports
key in themessenger.serializers
prototype?Another problem is that we don't have any way to differentiate "messenger serializer" that uses "symfony serializer" and which would need serialization context (ie:
\Symfony\Component\Messenger\Transport\Serialization\Serializer
) from "messenger serializer" which do not use Symfony's serializer (ie:\Symfony\Component\Messenger\Transport\Serialization\PhpSerializer
). That's why I think we need aSymfonySerializerAwareInterface
which extends\Symfony\Component\Messenger\Transport\Serialization\SerializerInterface
.At the end, my proposal would be:
We would then deprecate passing a service to
messenger.transports.serializer
and now require to pass one of the prototypes above. If nothing is provided undermessenger.serializers
, we would use\Symfony\Component\Messenger\Transport\Serialization\PhpSerializer
@weaverryan @chalasr @ro0NL I'd love to have your inputs on this <3
The text was updated successfully, but these errors were encountered: