Skip to content

Commit a664fd3

Browse files
committed
minor #17340 [Mailer] docs: add tip about listener priority to mailer.rst (rogamoore)
This PR was merged into the 4.4 branch. Discussion ---------- [Mailer] docs: add tip about listener priority to mailer.rst When signing or encrypting a message in a listener, it's important that the body has already been rendered - otherwise the signature will be invalid. As I spent a few hours to realize this, I suggest to add the attached tip to the documentation. See symfony/symfony#39354 (comment) for another example. Commits ------- 19570b8 add tip about listener priority to mailer.rst
2 parents 6392428 + 19570b8 commit a664fd3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mailer.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,14 @@ is sent::
10571057
}
10581058
}
10591059

1060+
.. tip::
1061+
1062+
The ``MessageEvent`` is also used internally. Depending on your use case
1063+
you might need to set a lower or higher priority for your own listener.
1064+
For example, when you want to sign the message, make sure to use ``-1``
1065+
or lower so the body has already been rendered and will not change after
1066+
signing.
1067+
10601068
Development & Debugging
10611069
-----------------------
10621070

0 commit comments

Comments
 (0)