Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d24ada

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Correct time type return Fix a typo Reword add tip about listener priority to mailer.rst
2 parents ef39db7 + 0c7f1ae commit 4d24ada

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

components/phpunit_bridge.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ is mocked so it uses the mocked time if no timestamp is specified.
511511
Other functions with an optional timestamp parameter that defaults to ``time()``
512512
will still use the system time instead of the mocked time. This means that you
513513
may need to change some code in your tests. For example, instead of ``new DateTime()``,
514-
you should use ``DateTime::createFromFormat('U', time())`` to use the mocked
514+
you should use ``DateTime::createFromFormat('U', (string) time())`` to use the mocked
515515
``time()`` function.
516516

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

mailer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,8 @@ This makes use of the :ref:`styles Twig namespace <mailer-css-namespace>` we cre
929929
earlier. You could, for example, `download the foundation-emails.css file`_
930930
directly from GitHub and save it in ``assets/styles``.
931931

932+
.. _signing-and-encrypting-messages:
933+
932934
Signing and Encrypting Messages
933935
-------------------------------
934936

@@ -1309,6 +1311,13 @@ is sent::
13091311
}
13101312
}
13111313

1314+
.. tip::
1315+
1316+
When using a ``MessageEvent`` listener to
1317+
:doc:`sign the email contents <signing-and-encrypting-messages>`, run it as
1318+
late as possible (e.g. setting a negative priority for it) so the email
1319+
contents are not set or modified after signing them.
1320+
13121321
Development & Debugging
13131322
-----------------------
13141323

0 commit comments

Comments
 (0)