Skip to content

Commit 7a6623a

Browse files
committed
[Messenger] Add a command to setup transports
1 parent 159771d commit 7a6623a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CHANGELOG
1919
* Added support for Translator paths, Twig paths in translation commands.
2020
* Added support for PHP files with translations in translation commands.
2121
* Added support for boolean container parameters within routes.
22+
* Added the `messenger:setup-transports` command to setup messenger transports
2223

2324
4.2.0
2425
-----

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ public function load(array $configs, ContainerBuilder $container)
279279
} else {
280280
$container->removeDefinition('console.command.messenger_consume_messages');
281281
$container->removeDefinition('console.command.messenger_debug');
282+
$container->removeDefinition('console.command.messenger_setup_transports');
282283
}
283284

284285
$this->registerValidationConfiguration($config['validation'], $container, $loader);

Resources/config/console.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@
8989
<tag name="monolog.logger" channel="messenger" />
9090
</service>
9191

92+
<service id="console.command.messenger_setup_transports" class="Symfony\Component\Messenger\Command\SetupTransportsCommand">
93+
<argument type="service" id="messenger.receiver_locator" />
94+
<argument type="collection" /> <!-- Receiver names -->
95+
96+
<tag name="console.command" command="messenger:setup-transports" />
97+
</service>
98+
9299
<service id="console.command.messenger_debug" class="Symfony\Component\Messenger\Command\DebugCommand">
93100
<argument type="collection" /> <!-- Message to handlers mapping -->
94101
<tag name="console.command" command="debug:messenger" />

0 commit comments

Comments
 (0)