Skip to content

Commit 401889b

Browse files
Merge branch '4.4'
* 4.4: (28 commits) [FrameworkBundle] Fix framework bundle lock configuration not working as expected [Validator] Add the missing translations for the Azerbaijani locale [HttpClient] workaround bad Content-Length sent by old libcurl [Cache] dont override native Memcached options Fix CS Fix exceptions (PDOException) error code type [ErrorHandler] fix return-type patching logic [Messenger] Added support for `from_transport` attribute on `messenger.message_handler` tag [ErrorHandler] don't throw deprecations for return-types by default ensure legacy event dispatcher compatibility ensure legacy event dispatcher compatibility Fix return type of Process::restart(). [Cache] fail gracefully when locking is not supported [HttpKernel] compress files generated by the profiler tweak deprecation messages and changelog fix version in @deprecated annotation Use VarCloner data instead of legacy array for query params [Security] use LegacyEventDispatcherProxy [HttpClient] fix undefined index access [HttpClient] fix race condition when reading response with informational status ...
2 parents 44afcd4 + 9377485 commit 401889b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
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

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)