Skip to content

Commit

Permalink
Filter target changes after changeset is built
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk authored Mar 22, 2024
1 parent aba2ed7 commit 2838957
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Entity/Subscribers/ActivitySubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down

0 comments on commit 2838957

Please sign in to comment.