diff --git a/src/Handler/Form/PublishHandler.php b/src/Handler/Form/PublishHandler.php index 234c7eb..76c6ff5 100644 --- a/src/Handler/Form/PublishHandler.php +++ b/src/Handler/Form/PublishHandler.php @@ -27,9 +27,7 @@ protected function createSnapshot(EventContextInterface $context): ?Snapshot if ($record === null || !$record->hasExtension(Versioned::class)) { return null; } - $snapshot = Snapshot::create(); - $snapshot->applyOrigin($record); - $snapshot->addOwnershipChain($record); + $snapshot = Snapshot::singleton()->createSnapshot($record); // Get the most recent change set to find out what was published $changeSet = ChangeSet::get()->filter([