Skip to content

Commit 8150ad8

Browse files
[Messenger] make dispatch(), handle() and send() methods return Envelope
1 parent aa4c21b commit 8150ad8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Controller/ControllerTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use Symfony\Component\HttpFoundation\StreamedResponse;
2828
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
2929
use Symfony\Component\HttpKernel\HttpKernelInterface;
30+
use Symfony\Component\Messenger\Envelope;
3031
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
3132
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
3233
use Symfony\Component\Security\Csrf\CsrfToken;
@@ -394,7 +395,7 @@ protected function isCsrfTokenValid(string $id, ?string $token): bool
394395
*
395396
* @final
396397
*/
397-
protected function dispatchMessage($message)
398+
protected function dispatchMessage($message): Envelope
398399
{
399400
if (!$this->container->has('message_bus')) {
400401
throw new \LogicException('The message bus is not enabled in your application. Try running "composer require symfony/messenger".');

0 commit comments

Comments
 (0)