Skip to content

Commit 9377485

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: ensure legacy event dispatcher compatibility
2 parents ec25229 + 135418b commit 9377485

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Transport/AbstractTransport.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Psr\Log\LoggerInterface;
1515
use Psr\Log\NullLogger;
1616
use Symfony\Component\Mailer\Envelope;
17+
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
1718
use Symfony\Component\Mailer\Event\MessageEvent;
1819
use Symfony\Component\Mailer\SentMessage;
1920
use Symfony\Component\Mime\Address;
@@ -32,7 +33,7 @@ abstract class AbstractTransport implements TransportInterface
3233

3334
public function __construct(EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
3435
{
35-
$this->dispatcher = $dispatcher;
36+
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
3637
$this->logger = $logger ?: new NullLogger();
3738
}
3839

0 commit comments

Comments
 (0)