Skip to content

Commit 265edf0

Browse files
committed
minor symfony#16465 [Messenger] Correct PHP Code block for messenger resetOnMessage (PhilETaylor)
This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] Correct PHP Code block for messenger resetOnMessage This PHP code was incorrect. See the yaml and the XML and compare with the PHP and you can see that (or waste 30 mins like I did debugging to work it out haha) the method needs to be called on the MessengerConfig object and not chained after a dsn call, which will just give an undefined method error. Commits ------- 428a0df Correct PHP Code block for messenger resetOnMessage
2 parents ad0ebaf + 428a0df commit 265edf0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

messenger.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,10 +768,7 @@ reset the service container between two messages:
768768
return static function (FrameworkConfig $framework) {
769769
$messenger = $framework->messenger();
770770
771-
$messenger->transport('async')
772-
->dsn('%env(MESSENGER_TRANSPORT_DSN)%')
773-
->resetOnMessage(true)
774-
;
771+
$messenger->resetOnMessage(true);
775772
};
776773
777774
.. versionadded:: 5.4

0 commit comments

Comments
 (0)