Skip to content

Commit 9366767

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Correct time type return Fix `notifier.flash_message_importance_mapper` service definition Fix a typo Reword add tip about listener priority to mailer.rst
2 parents ad86890 + 73aa358 commit 9366767

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

components/phpunit_bridge.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ specified.
545545
Other functions with an optional timestamp parameter that defaults to ``time()``
546546
will still use the system time instead of the mocked time. This means that you
547547
may need to change some code in your tests. For example, instead of ``new DateTime()``,
548-
you should use ``DateTime::createFromFormat('U', time())`` to use the mocked
548+
you should use ``DateTime::createFromFormat('U', (string) time())`` to use the mocked
549549
``time()`` function.
550550

551551
To use the ``ClockMock`` class in your test, add the ``@group time-sensitive``

mailer.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,8 @@ This makes use of the :ref:`styles Twig namespace <mailer-css-namespace>` we cre
956956
earlier. You could, for example, `download the foundation-emails.css file`_
957957
directly from GitHub and save it in ``assets/styles``.
958958

959+
.. _signing-and-encrypting-messages:
960+
959961
Signing and Encrypting Messages
960962
-------------------------------
961963

@@ -1429,6 +1431,13 @@ is sent::
14291431
// do something with the message
14301432
}
14311433

1434+
.. tip::
1435+
1436+
When using a ``MessageEvent`` listener to
1437+
:doc:`sign the email contents <signing-and-encrypting-messages>`, run it as
1438+
late as possible (e.g. setting a negative priority for it) so the email
1439+
contents are not set or modified after signing them.
1440+
14321441
Execute this command to find out which listeners are registered for this event
14331442
and their priorities:
14341443

@@ -1489,7 +1498,7 @@ FailedMessageEvent
14891498
{
14901499
// e.g you can get more information on this error when sending an email
14911500
$event->getError();
1492-
1501+
14931502
// do something with the message
14941503
}
14951504

notifier.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,8 @@ typical alert levels, which you can implement immediately using:
729729
730730
# config/services.yaml
731731
services:
732-
notifier.flash_message_importance_mapper: Symfony\Component\Notifier\FlashMessage\BootstrapFlashMessageImportanceMapper
732+
notifier.flash_message_importance_mapper:
733+
class: Symfony\Component\Notifier\FlashMessage\BootstrapFlashMessageImportanceMapper
733734
734735
.. code-block:: xml
735736

0 commit comments

Comments
 (0)