sroze / messenger-enqueue-transport

Uses Enqueue with Symfony's Messenger component.
MIT License
191 stars 55 forks source link

Help instruct to install serializer when it's missing #45

Closed weaverryan closed 5 years ago

weaverryan commented 5 years ago

If you currently only install this adapter, but do not install the serializer, you'll get this error at container build time:

The service "enqueue.messenger_transport.factory" has a dependency on a non-existent service
"messenger.transport.serializer

Unless you're doing something really custom, the issue will always be the same: you haven't installed the serializer. I think we could add a compiler pass that checks for the messenger.transport.serializer service and throws an exception if it's missing (this is similar to what FrameworkExtension does):

The Messenger serializer transport is missing. Try enabling it or running "composer require symfony/serializer-pack".'

Steveb-p commented 5 years ago

Isn't it already handled by https://github.com/symfony/framework-bundle/blob/ef6f382c29b488e131ea7aa49de8fcaca0c76c7b/DependencyInjection/FrameworkExtension.php#L1526 ?

devrck commented 5 years ago

Seems a legit request, I will see when I have the time to tackle it if nobody minds.