8000 minor #13349 Make it more obvious what the $handler is on Messenger d… · symfony/symfony-docs@2309998 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2309998

Browse files
committed
minor #13349 Make it more obvious what the $handler is on Messenger docs (jpjoao)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead (closes #13349). Discussion ---------- Make it more obvious what the $handler is on Messenger docs fixes #13148 As mentioned in the issue `$handler` was not obvious. I referenced the next item in the docs in the hope that this makes things more clear. This issue is present on other versions of the documentation but the behaviour of the function also changed (parameter now can be an array). I am unsure of how to proceed in such a case. Commits ------- 41d017a Make it more obvious what the $handler is (refers to the next item in the docs)
2 parents 1d61aaa + 41d017a commit 2309998

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/messenger.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,13 @@ are configured for you:
8989
Example::
9090

9191
use App\Message\MyMessage;
92+
use App\MessageHandler\MyMessageHandler;
9293
use Symfony\Component\Messenger\Handler\HandlersLocator;
9394
use Symfony\Component\Messenger\MessageBus;
9495
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
9596

97+
$handler = new MyMessageHandler();
98+
9699
$bus = new MessageBus([
97100
new HandleMessageMiddleware(new HandlersLocator([
98101
MyMessage::class => [$handler],

0 commit comments

Comments
 (0)
0