Allows to use Symfony Messenger with Symfony 3.4 and 4.0.
1. Add dependency with composer
composer require lendable/symfony-messenger-polyfill
2. Register the bundle in your bundles.php
return [
//...
Lendable\Polyfill\Symfony\MessengerBundle\MessengerBundle::class => ['all' => true],
];
The only important thing is that root key is lendable_polyfill_messenger
.
Everything is explained in the Symfony Documentation.
If we take this configuration example, instead of writing:
# config/packages/messenger.yaml
framework:
messenger:
routing:
'My\Message\Message': amqp # The name of the defined transport
You would write:
# config/packages/messenger.yaml
lendable_polyfill_messenger:
routing:
'My\Message\Message': amqp # The name of the defined transport