Skip to content

Commit f16753c

Browse files
Walid BOUGHDIRIwalidboughdiri
authored andcommitted
remove bc break code
1 parent 957a0b8 commit f16753c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy