Skip to content

Commit d9b0116

Browse files
remove bc break code
1 parent 76eef33 commit d9b0116

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Controller/ControllerTrait.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
2929
use Symfony\Component\HttpKernel\HttpKernelInterface;
3030
use Symfony\Component\Messenger\Envelope;
31+
use Symfony\Component\Messenger\Stamp\StampInterface;
3132
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
3233
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
3334
use Symfony\Component\Security\Csrf\CsrfToken;
@@ -397,18 +398,19 @@ protected function isCsrfTokenValid(string $id, ?string $token): bool
397398
/**
398399
* Dispatches a message to the bus.
399400
*
400-
* @param object|Envelope $message The message or the message pre-wrapped in an envelope
401+
* @param object|Envelope $message The message or the message pre-wrapped in an envelope
402+
* @param StampInterface[] $stamps
401403
*
402404
* @final
403405
*/
404-
protected function dispatchMessage($message): Envelope
406+
protected function dispatchMessage($message, array $stamps = []): Envelope
405407
{
406408
if (!$this->container->has('messenger.default_bus')) {
407409
$message = class_exists(Envelope::class) ? 'You need to define the "messenger.default_bus" configuration option.' : 'Try running "composer require symfony/messenger".';
408410
throw new \LogicException('The message bus is not enabled in your application. '.$message);
409411
}
410412

411-
return $this->container->get('messenger.default_bus')->dispatch($message);
413+
return $this->container->get('messenger.default_bus')->dispatch($message, $stamps);
412414
}
413415

414416
/**

0 commit comments

Comments
 (0)