Skip to content

Commit 8f83b9e

Browse files
committed
Merge branch '4.4' into 5.3
* 4.4: Take into account the EOM of Swiftmailer in docs
2 parents 4b01042 + 43e7718 commit 8f83b9e

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

components/http_kernel.rst

-7
Original file line numberDiff line numberDiff line change
@@ -498,12 +498,6 @@ as possible to the client (e.g. sending emails).
498498
Using the ``kernel.terminate`` event is optional, and should only be
499499
called if your kernel implements :class:`Symfony\\Component\\HttpKernel\\TerminableInterface`.
500500

501-
.. sidebar:: ``kernel.terminate`` in the Symfony Framework
502-
503-
If you use the :ref:`memory spooling <email-spool-memory>` option of the
504-
default Symfony mailer, then the `EmailSenderListener`_ is activated, which
505-
actually delivers any emails that you scheduled to send during the request.
506-
507501
.. _component-http-kernel-kernel-exception:
508502

509503
Handling Exceptions: the ``kernel.exception`` Event
@@ -758,5 +752,4 @@ Learn more
758752
.. _`SensioFrameworkExtraBundle`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
759753
.. _`@ParamConverter`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
760754
.. _`@Template`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/view.html
761-
.. _`EmailSenderListener`: https://github.com/symfony/swiftmailer-bundle/blob/master/EventListener/EmailSenderListener.php
762755
.. _variadic: https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list

console/command_in_controller.rst

+8-10
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ Instead, you can run the command directly from the controller.
2020
a controller has a slight performance impact because of the request stack
2121
overhead.
2222

23-
Imagine you want to send spooled Swift Mailer messages by
24-
:doc:`using the swiftmailer:spool:send command </email>`.
25-
Run this command from inside your controller via::
23+
Imagine you want to run the ``debug:twig`` from inside your controller::
2624

27-
// src/Controller/SpoolController.php
25+
// src/Controller/DebugTwigController.php
2826
namespace App\Controller;
2927

3028
use Symfony\Bundle\FrameworkBundle\Console\Application;
@@ -34,19 +32,19 @@ Run this command from inside your controller via::
3432
use Symfony\Component\HttpFoundation\Response;
3533
use Symfony\Component\HttpKernel\KernelInterface;
3634

37-
class SpoolController extends AbstractController
35+
class DebugTwigController extends AbstractController
3836
{
39-
public function sendSpool(int $messages = 10, KernelInterface $kernel): Response
37+
public function debugTwig(KernelInterface $kernel): Response
4038
{
4139
$application = new Application($kernel);
4240
$application->setAutoExit(false);
4341

4442
$input = new ArrayInput([
45-
'command' => 'swiftmailer:spool:send',
43+
'command' => 'debug:twig',
4644
// (optional) define the value of command arguments
4745
'fooArgument' => 'barValue',
4846
// (optional) pass options to the command
49-
'--message-limit' => $messages,
47+
'--bar' => 'fooValue',
5048
]);
5149

5250
// You can use NullOutput() if you don't need the output
@@ -76,7 +74,7 @@ First, require the package:
7674
7775
Now, use it in your controller::
7876

79-
// src/Controller/SpoolController.php
77+
// src/Controller/DebugTwigController.php
8078
namespace App\Controller;
8179

8280
use SensioLabs\AnsiConverter\AnsiToHtmlConverter;
@@ -85,7 +83,7 @@ Now, use it in your controller::
8583
use Symfony\Component\HttpFoundation\Response;
8684
// ...
8785

88-
class SpoolController extends AbstractController
86+
class DebugTwigController extends AbstractController
8987
{
9088
public function sendSpool(int $messages = 10): Response
9189
{

email.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
Swift Mailer
55
============
66

7-
.. note::
7+
.. caution::
88

9-
In Symfony 4.3, the :doc:`Mailer </mailer>` component was introduced and can
10-
be used instead of Swift Mailer.
9+
In Symfony 4.3, the :doc:`Mailer </mailer>` component was introduced and should
10+
be used instead of Swift Mailer as it won't be maintained anymore as of November
11+
2021.
1112

1213
Symfony provides a mailer feature based on the popular `Swift Mailer`_ library
1314
via the `SwiftMailerBundle`_. This mailer supports sending messages with your

migration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Setting up Composer
8282
Another point you will have to look out for is conflicts between
8383
dependencies in both applications. This is especially important if your
8484
existing application already uses Symfony components or libraries commonly
85-
used in Symfony applications such as Doctrine ORM, Swiftmailer or Twig.
85+
used in Symfony applications such as Doctrine ORM or Twig.
8686
A good way for ensuring compatibility is to use the same ``composer.json``
8787
for both project's dependencies.
8888

0 commit comments

Comments
 (0)