Skip to content

Commit 3b7a46d

Browse files
authored
Add notice to messenger for async code
1 parent 23ff699 commit 3b7a46d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Controller/BlogController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ public function commentNew(
123123
// passed in the event and they can even modify the execution flow, so
124124
// there's no guarantee that the rest of this controller will be executed.
125125
// See https://symfony.com/doc/current/components/event_dispatcher.html
126+
// You can also leverage the Symfony Messenger component if you need
127+
// some asynchronous operations.
128+
// See https://symfony.com/doc/current/messenger.html
126129
$eventDispatcher->dispatch(new CommentCreatedEvent($comment));
127130

128131
return $this->redirectToRoute('blog_post', ['slug' => $post->getSlug()]);

0 commit comments

Comments
 (0)