Skip to content

Commit aa875c6

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: inline the constructor [Mailer] Add a way to change the Bus transport dynamically
2 parents 55a8de3 + 399076b commit aa875c6

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

form/data_transformers.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,8 @@ to and from the issue number and the ``Issue`` object::
177177

178178
class IssueToNumberTransformer implements DataTransformerInterface
179179
{
180-
private $entityManager;
181-
182-
public function __construct(EntityManagerInterface $entityManager)
180+
public function __construct(private EntityManagerInterface $entityManager)
183181
{
184-
$this->entityManager = $entityManager;
185182
}
186183

187184
/**

mailer.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,17 @@ disable asynchronous delivery.
13421342
The :method:`Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport::stop`
13431343
method was made public in Symfony 6.1.
13441344

1345+
You can also select the transport by adding an ``X-Bus-Transport`` header (which
1346+
will be remove automatically from the final message)::
1347+
1348+
// Use the bus transport "app.another_bus":
1349+
$email->getHeaders()->addTextHeader('X-Bus-Transport', 'app.another_bus');
1350+
$mailer->send($email);
1351+
1352+
.. versionadded:: 6.2
1353+
1354+
The ``X-Bus-Transport`` header support was introduced in Symfony 6.2.
1355+
13451356
Adding Tags and Metadata to Emails
13461357
----------------------------------
13471358

0 commit comments

Comments
 (0)