Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 59836aa

Browse filesBrowse files
committed
minor #20851 [Messenger] Document stamps in HandleTrait::handle (Fan2Shrek)
This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [Messenger] Document stamps in HandleTrait::handle Fix #20842 Commits ------- 97d301a [Messenger] Document stamps in HandleTrait::handle
2 parents b5efbcd + 97d301a commit 59836aa
Copy full SHA for 59836aa

File tree

1 file changed

+14
-0
lines changed
Filter options

1 file changed

+14
-0
lines changed

‎messenger.rst

Copy file name to clipboardExpand all lines: messenger.rst
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,6 +2525,20 @@ wherever you need a query bus behavior instead of the ``MessageBusInterface``::
25252525
}
25262526
}
25272527

2528+
You also can also add stamps when handling a message. For example, you can
2529+
add an ``DoctrineFlushStamp`` to flush the entity manager after handling the message::
2530+
2531+
$this->handle(new SomeMessage($data), [new DoctrineFlushStamp()]);
2532+
2533+
.. note::
2534+
2535+
If adding a stamp of the same type that already exists in the envelope,
2536+
both stamps will be kept (see `Envelopes & Stamps`_).
2537+
2538+
.. versionadded:: 7.3
2539+
2540+
The ``$stamps`` parameter on the handle method was introduced in Symfony 7.3.
2541+
25282542
Customizing Handlers
25292543
--------------------
25302544

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.