Skip to content

Commit ec25229

Browse files
committed
ensure legacy event dispatcher compatibility
1 parent c944e8d commit ec25229

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)