Skip to content

Commit

Permalink
Fix incorrect dissociation array destructuring (#92)
Browse files Browse the repository at this point in the history
* Fix incorrect dissociation array destructuring

Fixes #91

* Add missing Entity ID to a tracked dissociation event

Co-authored-by: Damien Harper <[email protected]>
  • Loading branch information
janklan and DamienHarper authored Mar 8, 2022
1 parent 94d4d4b commit 657164b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private function hydrateWithScheduledCollectionUpdates(Transaction $transaction,
$transaction->trackAuditEvent(Transaction::DISSOCIATE, [
$collection->getOwner(),
$entity,
$this->id($entityManager, $entity),
$mapping,
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private function processAssociations(Transaction $transaction, EntityManagerInte

private function processDissociations(Transaction $transaction, EntityManagerInterface $entityManager): void
{
foreach ($transaction->getDissociated() as [$source, $target, $mapping]) {
foreach ($transaction->getDissociated() as [$source, $target, $id, $mapping]) {
$this->dissociate($entityManager, $source, $target, $mapping, $transaction->getTransactionHash());
}
}
Expand Down

0 comments on commit 657164b

Please sign in to comment.