[Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired#29517
Conversation
|
#SymfonyConHackday2018 |
src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml
Outdated
Show resolved
Hide resolved
chalasr
left a comment
There was a problem hiding this comment.
👍 with minor comment.
Sounds more like a feature to me, better merge it on master I'd say.
src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml
Outdated
Show resolved
Hide resolved
|
I wondered about this alias before, but the serializer is configurable through the |
|
Status: needs work |
|
I think we prefer defining in xml and removing in the extension: that makes the xml more useful to eg IDE plugins that want to use it. |
|
@nicolas-grekas Did you mean this? please review |
src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml
Outdated
Show resolved
Hide resolved
… SerializerInterface can be autowired
218ba84 to
2f0e948
Compare
|
Thank you @karser. |
…y_serializer so SerializerInterface can be autowired (karser) This PR was submitted for the 4.2 branch but it was squashed and merged into the 4.3-dev branch instead (closes #29517). Discussion ---------- [Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | License | MIT cc @thePanz Use case: Before: ``` Pnz\Messenger\FilesystemTransport\FilesystemTransportFactory: arguments: - '@messenger.transport.symfony_serializer' tags: ['messenger.transport_factory'] ``` After: ``` Pnz\Messenger\FilesystemTransport\FilesystemTransportFactory: tags: ['messenger.transport_factory'] ``` Commits ------- 2f0e948 [Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired
cc @thePanz
Use case:
Before:
After: