diff --git a/src/Controller/BlogController.php b/src/Controller/BlogController.php index 0a8afa60d..7155479f7 100644 --- a/src/Controller/BlogController.php +++ b/src/Controller/BlogController.php @@ -123,6 +123,9 @@ public function commentNew( // passed in the event and they can even modify the execution flow, so // there's no guarantee that the rest of this controller will be executed. // See https://symfony.com/doc/current/components/event_dispatcher.html + // You can also leverage the Symfony Messenger component if you need + // some asynchronous operations. + // See https://symfony.com/doc/current/messenger.html $eventDispatcher->dispatch(new CommentCreatedEvent($comment)); return $this->redirectToRoute('blog_post', ['slug' => $post->getSlug()]);