diff --git a/src/Entity/Subscribers/ActivitySubscriber.php b/src/Entity/Subscribers/ActivitySubscriber.php index 6fbf5fb..06a863a 100644 --- a/src/Entity/Subscribers/ActivitySubscriber.php +++ b/src/Entity/Subscribers/ActivitySubscriber.php @@ -171,10 +171,6 @@ private function findChanges(Action $action, object $target): array $changes = array_merge($changes, $uow->getEntityChangeSet($target)); - foreach ($this->findOverrides($target) as $fieldName => $override) { - $changes = $override->process($changes, $fieldName); - } - if ($action == Action::Create) foreach ($changes as $key => [$old, $new]) { $changes[$key] = $new; } @@ -194,6 +190,10 @@ private function findChanges(Action $action, object $target): array } } + foreach ($this->findOverrides($target) as $fieldName => $override) { + $changes = $override->process($changes, $fieldName); + } + return $changes; }