Skip to content

Commit 0c7f1ae

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: Correct time type return Fix a typo Reword add tip about listener priority to mailer.rst
2 parents 5c68371 + 8e18cc7 commit 0c7f1ae

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

components/phpunit_bridge.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ is mocked so it uses the mocked time if no timestamp is specified.
563563
Other functions with an optional timestamp parameter that defaults to ``time()``
564564
will still use the system time instead of the mocked time. This means that you
565565
may need to change some code in your tests. For example, instead of ``new DateTime()``,
566-
you should use ``DateTime::createFromFormat('U', time())`` to use the mocked
566+
you should use ``DateTime::createFromFormat('U', (string) time())`` to use the mocked
567567
``time()`` function.
568568

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

mailer.rst

+9
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,8 @@ This makes use of the :ref:`styles Twig namespace <mailer-css-namespace>` we cre
993993
earlier. You could, for example, `download the foundation-emails.css file`_
994994
directly from GitHub and save it in ``assets/styles``.
995995

996+
.. _signing-and-encrypting-messages:
997+
996998
Signing and Encrypting Messages
997999
-------------------------------
9981000

@@ -1391,6 +1393,13 @@ is sent::
13911393
}
13921394
}
13931395

1396+
.. tip::
1397+
1398+
When using a ``MessageEvent`` listener to
1399+
:doc:`sign the email contents <signing-and-encrypting-messages>`, run it as
1400+
late as possible (e.g. setting a negative priority for it) so the email
1401+
contents are not set or modified after signing them.
1402+
13941403
Development & Debugging
13951404
-----------------------
13961405

0 commit comments

Comments
 (0)