From 8836f08b289cb521db2fac6253e8315c912fcb3c Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Tue, 22 Aug 2023 20:55:58 +0200 Subject: [PATCH] Update lib/Doctrine/ORM/UnitOfWork.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Grégoire Paris --- lib/Doctrine/ORM/UnitOfWork.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 3a2e6eee5d5..f85a62ea79d 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -1207,7 +1207,13 @@ private function executeInserts(): void // Defer dispatching `postPersist` events to until all entities have been inserted and post-insert // IDs have been assigned. foreach ($eventsToDispatch as $event) { - $this->listenersInvoker->invoke($event['class'], Events::postPersist, $event['entity'], new PostPersistEventArgs($event['entity'], $this->em), $event['invoke']); + $this->listenersInvoker->invoke( + $event['class'], + Events::postPersist, + $event['entity'], + new PostPersistEventArgs($event['entity'], $this->em), + $event['invoke'] + ); } }