diff --git a/src/EventListener/AuditListener.php b/src/EventListener/AuditListener.php index ef372d9..1eff1de 100644 --- a/src/EventListener/AuditListener.php +++ b/src/EventListener/AuditListener.php @@ -176,6 +176,9 @@ public function onFlush(OnFlushEventArgs $args): void continue; } $mapping = $collection->getMapping(); + if (!is_array($mapping)) { + $mapping = $mapping->toArray(); + } if (!$mapping['isOwningSide'] || $mapping['type'] !== ClassMetadata::MANY_TO_MANY) { continue; // ignore inverse side or one to many relations }