diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherWorkspaceInterface.php b/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherWorkspaceInterface.php index ecba09c7d60..4d2d5094818 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherWorkspaceInterface.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherWorkspaceInterface.php @@ -15,7 +15,6 @@ namespace Neos\ContentRepository\Core\Feature\Common; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -30,7 +29,6 @@ interface RebasableToOtherWorkspaceInterface { public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): CommandInterface; /** diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php index fad58e92820..936505d278d 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php @@ -25,7 +25,7 @@ * basically making all content available not just in the source(original) DSP, * but also in the target-DimensionSpacePoint. * - * NOTE: the Source Dimension Space Point must be a parent of the target Dimension Space Point. + * NOTE: the Source Dimension Space Point must be a generalization of the target Dimension Space Point. * * This is needed if "de" exists, and you want to create a "de_CH" specialization. * @@ -39,27 +39,28 @@ RebasableToOtherWorkspaceInterface { /** - * @param ContentStreamId $contentStreamId The id of the content stream to perform the operation in. - * This content stream is specifically created for this operation and thus not prone to conflicts, - * thus we don't need the workspace name + * @param WorkspaceName $workspaceName The name of the workspace to perform the operation in. * @param DimensionSpacePoint $source source dimension space point * @param DimensionSpacePoint $target target dimension space point */ private function __construct( - public ContentStreamId $contentStreamId, + public WorkspaceName $workspaceName, public DimensionSpacePoint $source, public DimensionSpacePoint $target ) { } /** - * @param ContentStreamId $contentStreamId The id of the content stream to perform the operation in + * @param WorkspaceName $workspaceName The name of the workspace to perform the operation in * @param DimensionSpacePoint $source source dimension space point * @param DimensionSpacePoint $target target dimension space point */ - public static function create(ContentStreamId $contentStreamId, DimensionSpacePoint $source, DimensionSpacePoint $target): self - { - return new self($contentStreamId, $source, $target); + public static function create( + WorkspaceName $workspaceName, + DimensionSpacePoint $source, + DimensionSpacePoint $target + ): self { + return new self($workspaceName, $source, $target); } /** @@ -68,16 +69,16 @@ public static function create(ContentStreamId $contentStreamId, DimensionSpacePo public static function fromArray(array $array): self { return new self( - ContentStreamId::fromString($array['contentStreamId']), + WorkspaceName::fromString($array['workspaceName']), DimensionSpacePoint::fromArray($array['source']), DimensionSpacePoint::fromArray($array['target']) ); } - public function createCopyForWorkspace(WorkspaceName $targetWorkspaceName, ContentStreamId $targetContentStreamId): self + public function createCopyForWorkspace(WorkspaceName $targetWorkspaceName): self { return new self( - $targetContentStreamId, + $targetWorkspaceName, $this->source, $this->target ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php index 0efcb7e929c..498ba261e49 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php @@ -17,7 +17,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherWorkspaceInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -35,27 +34,28 @@ RebasableToOtherWorkspaceInterface { /** - * @param ContentStreamId $contentStreamId The id of the content stream to perform the operation in. - * This content stream is specifically created for this operation and thus not prone to conflicts, - * thus we don't need the workspace name + * @param WorkspaceName $workspaceName The name of the workspace to perform the operation in. * @param DimensionSpacePoint $source source dimension space point * @param DimensionSpacePoint $target target dimension space point */ private function __construct( - public ContentStreamId $contentStreamId, + public WorkspaceName $workspaceName, public DimensionSpacePoint $source, - public DimensionSpacePoint $target + public DimensionSpacePoint $target, ) { } /** - * @param ContentStreamId $contentStreamId The id of the content stream to perform the operation in + * @param WorkspaceName $workspaceName The name of the workspace to perform the operation in * @param DimensionSpacePoint $source source dimension space point * @param DimensionSpacePoint $target target dimension space point */ - public static function create(ContentStreamId $contentStreamId, DimensionSpacePoint $source, DimensionSpacePoint $target): self - { - return new self($contentStreamId, $source, $target); + public static function create( + WorkspaceName $workspaceName, + DimensionSpacePoint $source, + DimensionSpacePoint $target + ): self { + return new self($workspaceName, $source, $target); } /** @@ -64,7 +64,7 @@ public static function create(ContentStreamId $contentStreamId, DimensionSpacePo public static function fromArray(array $array): self { return new self( - ContentStreamId::fromString($array['contentStreamId']), + WorkspaceName::fromString($array['workspaceName']), DimensionSpacePoint::fromArray($array['source']), DimensionSpacePoint::fromArray($array['target']) ); @@ -72,10 +72,9 @@ public static function fromArray(array $array): self public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( - $targetContentStreamId, + $targetWorkspaceName, $this->source, $this->target ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php index 74bbd380c4d..ca0b66861b4 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php @@ -67,22 +67,22 @@ private function handleMoveDimensionSpacePoint( MoveDimensionSpacePoint $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStream($command->contentStreamId, $contentRepository); - $streamName = ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) + $contentStreamId = $this->requireContentStreamForWorkspaceName($command->workspaceName, $contentRepository); + $streamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamId) ->getEventStreamName(); self::requireDimensionSpacePointToBeEmptyInContentStream( $command->target, - $command->contentStreamId, + $contentStreamId, $contentRepository->getContentGraph() ); - $this->requireDimensionSpacePointToExistInConfiguration($command->target); + $this->requireDimensionSpacePointToExist($command->target); return new EventsToPublish( $streamName, Events::with( new DimensionSpacePointWasMoved( - $command->contentStreamId, + $contentStreamId, $command->source, $command->target ), @@ -95,16 +95,16 @@ private function handleAddDimensionShineThrough( AddDimensionShineThrough $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStream($command->contentStreamId, $contentRepository); - $streamName = ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) + $contentStreamId = $this->requireContentStreamForWorkspaceName($command->workspaceName, $contentRepository); + $streamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamId) ->getEventStreamName(); self::requireDimensionSpacePointToBeEmptyInContentStream( $command->target, - $command->contentStreamId, + $contentStreamId, $contentRepository->getContentGraph() ); - $this->requireDimensionSpacePointToExistInConfiguration($command->target); + $this->requireDimensionSpacePointToExist($command->target); $this->requireDimensionSpacePointToBeSpecialization($command->target, $command->source); @@ -112,7 +112,7 @@ private function handleAddDimensionShineThrough( $streamName, Events::with( new DimensionShineThroughWasAdded( - $command->contentStreamId, + $contentStreamId, $command->source, $command->target ) @@ -124,7 +124,7 @@ private function handleAddDimensionShineThrough( /** * @throws DimensionSpacePointNotFound */ - protected function requireDimensionSpacePointToExistInConfiguration(DimensionSpacePoint $dimensionSpacePoint): void + protected function requireDimensionSpacePointToExist(DimensionSpacePoint $dimensionSpacePoint): void { $allowedDimensionSubspace = $this->contentDimensionZookeeper->getAllowedDimensionSubspace(); if (!$allowedDimensionSubspace->contains($dimensionSpacePoint)) { @@ -183,19 +183,4 @@ protected function requireContentStreamForWorkspaceName( return $contentStreamId; } - - /** - * @throws ContentStreamDoesNotExistYet - */ - protected function requireContentStream( - ContentStreamId $contentStreamId, - ContentRepository $contentRepository - ): void { - if (!$contentRepository->getContentStreamFinder()->hasContentStream($contentStreamId)) { - throw new ContentStreamDoesNotExistYet( - 'Content stream "' . $contentStreamId->value . '" does not exist yet.', - 1521386692 - ); - } - } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php index 98dfe0d2fc9..38cbc0b8e2a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php @@ -145,7 +145,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php index 519d6dd9299..454b7c2ccb2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php @@ -91,7 +91,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php index 0316171ee2a..de0ad11d57d 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php @@ -91,7 +91,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php index d47945b15f2..6c1ebbf9dad 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php @@ -156,7 +156,6 @@ public function withNodeAggregateIdMapping( public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php index 80258dce6e8..ca589337e85 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php @@ -110,7 +110,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php index a2858259c8e..3a756163488 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php @@ -120,7 +120,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php index a85dce3c1eb..3f635af08e0 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php @@ -98,7 +98,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php index ad2d2d852b3..f169088ff73 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php @@ -111,7 +111,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php index 13fccd444ce..3845fec6e1e 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php @@ -85,7 +85,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php index 7263f659646..e979e4d25c1 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php @@ -109,7 +109,6 @@ public function withTetheredDescendantNodeAggregateIds(NodeAggregateIdsByNodePat public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php index 36305dda53f..c842644e845 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php @@ -90,7 +90,6 @@ public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php index ff2ba724c0a..9bbb1f320cc 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php @@ -127,7 +127,6 @@ public function jsonSerialize(): array public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/UpdateRootNodeAggregateDimensions.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/UpdateRootNodeAggregateDimensions.php index 5d8597c827b..302c05ed895 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/UpdateRootNodeAggregateDimensions.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/UpdateRootNodeAggregateDimensions.php @@ -72,7 +72,6 @@ public function jsonSerialize(): array public function createCopyForWorkspace( WorkspaceName $targetWorkspaceName, - ContentStreamId $targetContentStreamId ): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/TagSubtree.php b/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/TagSubtree.php index 2f6d1d3c562..71fb012b0cc 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/TagSubtree.php +++ b/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/TagSubtree.php @@ -78,7 +78,7 @@ public static function fromArray(array $array): self ); } - public function createCopyForWorkspace(WorkspaceName $targetWorkspaceName, ContentStreamId $targetContentStreamId): self + public function createCopyForWorkspace(WorkspaceName $targetWorkspaceName): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/UntagSubtree.php b/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/UntagSubtree.php index 498f75fc193..cca49333c95 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/UntagSubtree.php +++ b/Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Command/UntagSubtree.php @@ -79,7 +79,7 @@ public static function fromArray(array $array): self ); } - public function createCopyForWorkspace(WorkspaceName $targetWorkspaceName, ContentStreamId $targetContentStreamId): self + public function createCopyForWorkspace(WorkspaceName $targetWorkspaceName): self { return new self( $targetWorkspaceName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php index 454aafec547..34ce2ade5ff 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php @@ -519,7 +519,7 @@ private function handlePublishIndividualNodesFromWorkspace( // 4) using the new content stream, apply the matching commands ContentStreamIdOverride::applyContentStreamIdToClosure( $command->contentStreamIdForMatchingPart, - function () use ($matchingCommands, $contentRepository, $baseWorkspace, $command): void { + function () use ($matchingCommands, $contentRepository, $baseWorkspace): void { foreach ($matchingCommands as $matchingCommand) { if (!($matchingCommand instanceof RebasableToOtherWorkspaceInterface)) { throw new \RuntimeException( @@ -530,7 +530,6 @@ function () use ($matchingCommands, $contentRepository, $baseWorkspace, $command $contentRepository->handle($matchingCommand->createCopyForWorkspace( $baseWorkspace->workspaceName, - $command->contentStreamIdForMatchingPart ))->block(); } } @@ -656,7 +655,7 @@ private function handleDiscardIndividualNodesFromWorkspace( try { ContentStreamIdOverride::applyContentStreamIdToClosure( $command->newContentStreamId, - function () use ($commandsToKeep, $contentRepository, $baseWorkspace, $command): void { + function () use ($commandsToKeep, $contentRepository, $baseWorkspace): void { foreach ($commandsToKeep as $matchingCommand) { if (!($matchingCommand instanceof RebasableToOtherWorkspaceInterface)) { throw new \RuntimeException( @@ -667,7 +666,6 @@ function () use ($commandsToKeep, $contentRepository, $baseWorkspace, $command): $contentRepository->handle($matchingCommand->createCopyForWorkspace( $baseWorkspace->workspaceName, - $command->newContentStreamId ))->block(); } } diff --git a/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php b/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php index 5f5f1fd742f..8bd7c065860 100644 --- a/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php +++ b/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php @@ -128,7 +128,7 @@ protected function executeSubMigrationAndBlock( } if ($transformations->containsGlobal()) { - $transformations->executeGlobalAndBlock($workspaceForReading->workspaceName, $contentStreamForWriting); + $transformations->executeGlobalAndBlock($workspaceNameForWriting); } elseif ($transformations->containsNodeAggregateBased()) { foreach ($this->contentRepository->getContentGraph()->findUsedNodeTypeNames() as $nodeTypeName) { foreach ( diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php index 2d8e7a6764d..824dcae90a4 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php @@ -18,7 +18,6 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Command\AddDimensionShineThrough; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -50,12 +49,11 @@ public function __construct( } public function execute( - WorkspaceName $workspaceNameForReading, - ContentStreamId $contentStreamForWriting + WorkspaceName $workspaceNameForWriting, ): CommandResult { return $this->contentRepository->handle( AddDimensionShineThrough::create( - $contentStreamForWriting, + $workspaceNameForWriting, $this->from, $this->to ) diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php b/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php index 2d965a1ec3f..a8017546f84 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php @@ -26,7 +26,6 @@ interface GlobalTransformationInterface { public function execute( - WorkspaceName $workspaceNameForReading, - ContentStreamId $contentStreamForWriting + WorkspaceName $workspaceNameForWriting, ): CommandResult; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php index 52ebf038743..eeda40a3ea5 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php @@ -18,7 +18,6 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Command\MoveDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -48,12 +47,11 @@ public function __construct( } public function execute( - WorkspaceName $workspaceNameForReading, - ContentStreamId $contentStreamForWriting + WorkspaceName $workspaceNameForWriting, ): CommandResult { return $this->contentRepository->handle( MoveDimensionSpacePoint::create( - $contentStreamForWriting, + $workspaceNameForWriting, $this->from, $this->to ) diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php b/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php index 42c34eaec40..cbc86408335 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php @@ -91,11 +91,10 @@ public function containsMoreThanOneTransformationType(): bool } public function executeGlobalAndBlock( - WorkspaceName $workspaceNameForReading, - ContentStreamId $contentStreamForWriting + WorkspaceName $workspaceNameForWriting, ): void { foreach ($this->globalTransformations as $globalTransformation) { - $globalTransformation->execute($workspaceNameForReading, $contentStreamForWriting)->block(); + $globalTransformation->execute($workspaceNameForWriting)->block(); } } diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/ContentCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/ContentCommandController.php index e2eb14961c3..d4b5c15dc61 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/ContentCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/ContentCommandController.php @@ -114,7 +114,7 @@ public function moveDimensionSpacePointCommand(string $source, string $target, s $contentRepositoryInstance->handle( MoveDimensionSpacePoint::create( - $workspaceInstance->currentContentStreamId, + $workspaceInstance->workspaceName, $sourceDimensionSpacePoint, $targetDimensionSpacePoint )