8000 Use the new HandlersLocator and initialise it correctly. · symfony/symfony-docs@c422cbc · GitHub
[go: up one dir, main page]

Skip to content

Commit c422cbc

Browse files
authored
Use the new HandlersLocator and initialise it correctly.
It looks like the HandlerLocator is replaced with the HandlersLocator in 4.2.
1 parent 2086b16 commit c422cbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/messenger.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ Example::
8383

8484
use App\Message\MyMessage;
8585
use Symfony\Component\Messenger\MessageBus;
86-
use Symfony\Component\Messenger\Handler\Locator\HandlerLocator;
86+
use Symfony\Component\Messenger\Handler\HandlersLocator;
8787
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
8888

8989
$bus = new MessageBus([
90-
new HandleMessageMiddleware(new HandlerLocator([
91-
MyMessage::class => $handler,
90+
new HandleMessageMiddleware(new HandlersLocator([
91+
MyMessage::class => ['dummy' => $handler],
9292
])),
9393
]);
9494

0 commit comments

Comments
 (0)
0