8000 minor #10728 Use the new HandlersLocator and initialise it correctly.… · symfony/symfony-docs@66973ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 66973ab

Browse files
committed
minor #10728 Use the new HandlersLocator and initialise it correctly. (j92)
This PR was merged into the 4.2 branch. Discussion ---------- Use the new HandlersLocator and initialise it correctly. It looks like the HandlerLocator is replaced with the HandlersLocator in 4.2. Here you can check the initialisation of the `HandlersLocator`: https://github.com/symfony/symfony/blob/4.2/src/Symfony/Component/Messenger/Tests/Handler/HandlersLocatorTest.php <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- c422cbc Use the new HandlersLocator and initialise it correctly.
2 parents ed92cd2 + c422cbc commit 66973ab

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