diff --git a/Classes/EventStore/EventNormalizer.php b/Classes/EventStore/EventNormalizer.php index 52f23d63..0ba11175 100644 --- a/Classes/EventStore/EventNormalizer.php +++ b/Classes/EventStore/EventNormalizer.php @@ -36,8 +36,6 @@ use Neos\ContentRepository\Core\Feature\WorkspaceModification\Event\WorkspaceWasRemoved; use Neos\ContentRepository\Core\Feature\WorkspaceModification\Event\WorkspaceWasRenamed; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasDiscarded; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasPartiallyDiscarded; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasPartiallyPublished; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasPublished; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Event\WorkspaceRebaseFailed; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Event\WorkspaceWasRebased; @@ -102,8 +100,6 @@ public function __construct() WorkspaceWasCreated::class, WorkspaceWasRenamed::class, WorkspaceWasDiscarded::class, - WorkspaceWasPartiallyDiscarded::class, - WorkspaceWasPartiallyPublished::class, WorkspaceWasPublished::class, WorkspaceWasRebased::class, WorkspaceWasRemoved::class, diff --git a/Classes/Feature/WorkspaceCommandHandler.php b/Classes/Feature/WorkspaceCommandHandler.php index 8af4e023..00911a70 100644 --- a/Classes/Feature/WorkspaceCommandHandler.php +++ b/Classes/Feature/WorkspaceCommandHandler.php @@ -47,8 +47,6 @@ use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishIndividualNodesFromWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasDiscarded; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasPartiallyDiscarded; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasPartiallyPublished; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Event\WorkspaceWasPublished; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Command\RebaseWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Dto\RebaseErrorHandlingStrategy; @@ -539,7 +537,7 @@ static function ($handle) use ($commandSimulator, $matchingCommands, $remainingC new EventsToPublish( WorkspaceEventStreamName::fromWorkspaceName($command->workspaceName)->getEventStreamName(), Events::fromArray([ - new WorkspaceWasPartiallyPublished( + new WorkspaceWasPublished( $command->workspaceName, $baseWorkspace->workspaceName, $command->contentStreamIdForRemainingPart, @@ -639,7 +637,7 @@ static function ($handle) use ($commandsToKeep): void { new EventsToPublish( WorkspaceEventStreamName::fromWorkspaceName($command->workspaceName)->getEventStreamName(), Events::with( - new WorkspaceWasPartiallyDiscarded( + new WorkspaceWasDiscarded( $command->workspaceName, $command->newContentStreamId, $workspace->currentContentStreamId, diff --git a/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyDiscarded.php b/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyDiscarded.php deleted file mode 100644 index 28c113e8..00000000 --- a/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyDiscarded.php +++ /dev/null @@ -1,58 +0,0 @@ -workspaceName; - } - - public static function fromArray(array $values): self - { - return new self( - WorkspaceName::fromString($values['workspaceName']), - ContentStreamId::fromString($values['newContentStreamId']), - ContentStreamId::fromString($values['previousContentStreamId']) - ); - } - - public function jsonSerialize(): array - { - return get_object_vars($this); - } -} diff --git a/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyPublished.php b/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyPublished.php deleted file mode 100644 index bd6b2273..00000000 --- a/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyPublished.php +++ /dev/null @@ -1,60 +0,0 @@ -withStatus(ContentStreamStatus::NO_LONGER_IN_USE); } break; - case WorkspaceWasPartiallyDiscarded::class: - if (isset($cs[$domainEvent->newContentStreamId->value])) { - $cs[$domainEvent->newContentStreamId->value] = $cs[$domainEvent->newContentStreamId->value] - ->withStatus(ContentStreamStatus::IN_USE_BY_WORKSPACE); - } - if (isset($cs[$domainEvent->previousContentStreamId->value])) { - $cs[$domainEvent->previousContentStreamId->value] = $cs[$domainEvent->previousContentStreamId->value] - ->withStatus(ContentStreamStatus::NO_LONGER_IN_USE); - } - break; - case WorkspaceWasPartiallyPublished::class: - if (isset($cs[$domainEvent->newSourceContentStreamId->value])) { - $cs[$domainEvent->newSourceContentStreamId->value] = $cs[$domainEvent->newSourceContentStreamId->value] - ->withStatus(ContentStreamStatus::IN_USE_BY_WORKSPACE); - } - if (isset($cs[$domainEvent->previousSourceContentStreamId->value])) { - $cs[$domainEvent->previousSourceContentStreamId->value] = $cs[$domainEvent->previousSourceContentStreamId->value] - ->withStatus(ContentStreamStatus::NO_LONGER_IN_USE); - } - break; case WorkspaceWasPublished::class: if (isset($cs[$domainEvent->newSourceContentStreamId->value])) { $cs[$domainEvent->newSourceContentStreamId->value] = $cs[$domainEvent->newSourceContentStreamId->value]