File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Symfony/Bridge/Doctrine/Messenger/EventSubscriber Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1717use Symfony \Bridge \Doctrine \Messenger \EntityMessage \EntityMessageCollectionInterface ;
1818use Symfony \Component \Messenger \Envelope ;
1919use Symfony \Component \Messenger \MessageBusInterface ;
20- use Symfony \Component \Messenger \Middleware \ Configuration \ Transaction ;
20+ use Symfony \Component \Messenger \Stamp \ DispatchAfterCurrentBusStamp ;
2121
2222/**
2323 * Doctrine listener that listens to Persist, Update and Remove. Every time this is
@@ -65,7 +65,7 @@ private function collectEventsFromEntity(LifecycleEventArgs $message)
6565
6666 if ($ entity instanceof EntityMessageCollectionInterface) {
6767 foreach ($ entity ->getRecordedMessages () as $ message ) {
68- $ this ->messageBus ->dispatch ((new Envelope ($ message ))->with (new Transaction ()));
68+ $ this ->messageBus ->dispatch ((new Envelope ($ message ))->with (new DispatchAfterCurrentBusStamp ()));
6969 }
7070
7171 $ entity ->resetRecordedMessages ();
You can’t perform that action at this time.
0 commit comments