ensure legacy event dispatcher compatibility
This commit is contained in:
parent
1595d307cf
commit
860688ff2e
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Mailer;
|
namespace Symfony\Component\Mailer;
|
||||||
|
|
||||||
|
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
|
||||||
use Symfony\Component\Mailer\Event\MessageEvent;
|
use Symfony\Component\Mailer\Event\MessageEvent;
|
||||||
use Symfony\Component\Mailer\Messenger\SendEmailMessage;
|
use Symfony\Component\Mailer\Messenger\SendEmailMessage;
|
||||||
use Symfony\Component\Mailer\Transport\TransportInterface;
|
use Symfony\Component\Mailer\Transport\TransportInterface;
|
||||||
@ -31,7 +32,7 @@ final class Mailer implements MailerInterface
|
|||||||
{
|
{
|
||||||
$this->transport = $transport;
|
$this->transport = $transport;
|
||||||
$this->bus = $bus;
|
$this->bus = $bus;
|
||||||
$this->dispatcher = $dispatcher;
|
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function send(RawMessage $message, Envelope $envelope = null): void
|
public function send(RawMessage $message, Envelope $envelope = null): void
|
||||||
|
Reference in New Issue
Block a user