Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5d4f302

Browse files
committed
bug #33707 [Mailer] ensure legacy event dispatcher compatibility (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [Mailer] ensure legacy event dispatcher compatibility | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 860688f ensure legacy event dispatcher compatibility
2 parents 1595d30 + 860688f commit 5d4f302

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Mailer/Mailer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Mailer;
1313

14+
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
1415
use Symfony\Component\Mailer\Event\MessageEvent;
1516
use Symfony\Component\Mailer\Messenger\SendEmailMessage;
1617
use Symfony\Component\Mailer\Transport\TransportInterface;
@@ -31,7 +32,7 @@ public function __construct(TransportInterface $transport, MessageBusInterface $
3132
{
3233
$this->transport = $transport;
3334
$this->bus = $bus;
34-
$this->dispatcher = $dispatcher;
35+
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
3536
}
3637

3738
public function send(RawMessage $message, Envelope $envelope = null): void

0 commit comments

Comments
 (0)