diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W6-WorkspaceRebasing/03-RebasingWithConflictingChanges.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W6-WorkspaceRebasing/03-RebasingWithConflictingChanges.feature index d12182497d7..cf7d6746261 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W6-WorkspaceRebasing/03-RebasingWithConflictingChanges.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W6-WorkspaceRebasing/03-RebasingWithConflictingChanges.feature @@ -37,8 +37,6 @@ Feature: Workspace rebasing - conflicting changes | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Original"} | - # we need to ensure that the projections are up to date now; otherwise a content stream is forked with an out- - # of-date base version. This means the content stream can never be merged back, but must always be rebased. And the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W7-WorkspacePublication/02-PublishWorkspace.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W7-WorkspacePublication/02-PublishWorkspace.feature index a8d0884563d..ad3ee6db36c 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W7-WorkspacePublication/02-PublishWorkspace.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W7-WorkspacePublication/02-PublishWorkspace.feature @@ -37,8 +37,6 @@ Feature: Workspace based content publishing | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Original"} | - # we need to ensure that the projections are up to date now; otherwise a content stream is forked with an out- - # of-date base version. This means the content stream can never be merged back, but must always be rebased. And the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W8-IndividualNodePublication/04-AllFeaturePublication.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W8-IndividualNodePublication/04-AllFeaturePublication.feature index cefedf691f0..f08d5bf47d4 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W8-IndividualNodePublication/04-AllFeaturePublication.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W8-IndividualNodePublication/04-AllFeaturePublication.feature @@ -129,8 +129,6 @@ Feature: Publishing hide/show scenario of nodes | nodeAggregateId | "sir-nodeward-nodington-iii" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - # we need to ensure that the projections are up to date now; otherwise a content stream is forked with an out- - # of-date base version. This means the content stream can never be merged back, but must always be rebased. Given the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W9-WorkspaceDiscarding/02-DiscardWorkspace.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W9-WorkspaceDiscarding/02-DiscardWorkspace.feature index 2174937dad7..e55d3c8326d 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W9-WorkspaceDiscarding/02-DiscardWorkspace.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/W9-WorkspaceDiscarding/02-DiscardWorkspace.feature @@ -37,8 +37,7 @@ Feature: Workspace discarding - basic functionality | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Original"} | - # we need to ensure that the projections are up to date now; otherwise a content stream is forked with an out- - # of-date base version. This means the content stream can never be merged back, but must always be rebased. + And the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | diff --git a/Neos.ContentRepository.Core/Classes/CommandHandler/CommandResult.php b/Neos.ContentRepository.Core/Classes/CommandHandler/CommandResult.php deleted file mode 100644 index 626a2b56381..00000000000 --- a/Neos.ContentRepository.Core/Classes/CommandHandler/CommandResult.php +++ /dev/null @@ -1,23 +0,0 @@ -contentRepository->handle($command); + $this->contentRepository->handle($command); } public function getContentStreamVersion(ContentStreamId $contentStreamId): Version diff --git a/Neos.ContentRepository.Core/Classes/ContentRepository.php b/Neos.ContentRepository.Core/Classes/ContentRepository.php index 2acb37f73e2..8acc2822673 100644 --- a/Neos.ContentRepository.Core/Classes/ContentRepository.php +++ b/Neos.ContentRepository.Core/Classes/ContentRepository.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandBus; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; use Neos\ContentRepository\Core\DimensionSpace\InterDimensionalVariationGraph; use Neos\ContentRepository\Core\EventStore\DecoratedEvent; @@ -95,9 +94,8 @@ public function __construct( * The only API to send commands (mutation intentions) to the system. * * @param CommandInterface $command - * @return CommandResult */ - public function handle(CommandInterface $command): CommandResult + public function handle(CommandInterface $command): void { // the commands only calculate which events they want to have published, but do not do the // publishing themselves @@ -132,7 +130,7 @@ public function handle(CommandInterface $command): CommandResult $eventsToPublish->expectedVersion, ); - return $this->eventPersister->publishEvents($eventsToPublish); + $this->eventPersister->publishEvents($eventsToPublish); } diff --git a/Neos.ContentRepository.Core/Classes/EventStore/EventPersister.php b/Neos.ContentRepository.Core/Classes/EventStore/EventPersister.php index eef94b2a8f0..5823dee1ed5 100644 --- a/Neos.ContentRepository.Core/Classes/EventStore/EventPersister.php +++ b/Neos.ContentRepository.Core/Classes/EventStore/EventPersister.php @@ -4,11 +4,9 @@ namespace Neos\ContentRepository\Core\EventStore; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\CommandHandler\PendingProjections; use Neos\ContentRepository\Core\Projection\ProjectionCatchUpTriggerInterface; use Neos\ContentRepository\Core\Projection\Projections; -use Neos\ContentRepository\Core\Projection\WithMarkStaleInterface; use Neos\EventStore\EventStoreInterface; use Neos\EventStore\Exception\ConcurrencyException; use Neos\EventStore\Model\Events; @@ -31,13 +29,12 @@ public function __construct( /** * @param EventsToPublish $eventsToPublish - * @return CommandResult * @throws ConcurrencyException in case the expectedVersion does not match */ - public function publishEvents(EventsToPublish $eventsToPublish): CommandResult + public function publishEvents(EventsToPublish $eventsToPublish): void { if ($eventsToPublish->events->isEmpty()) { - return new CommandResult(); + return; } // the following logic could also be done in an AppEventStore::commit method (being called // directly from the individual Command Handlers). @@ -59,6 +56,5 @@ public function publishEvents(EventsToPublish $eventsToPublish): CommandResult ); $this->projectionCatchUpTrigger->triggerCatchUp($pendingProjections->projections); - return new CommandResult(); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php index ea4f29c6232..1b973751081 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandHandlerInterface; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\CommandHandlingDependencies; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\EventStore\DecoratedEvent; @@ -241,7 +240,7 @@ private function publishContentStream( ContentStreamId $contentStreamId, WorkspaceName $baseWorkspaceName, ContentStreamId $baseContentStreamId, - ): ?CommandResult { + ): void { $baseWorkspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamId( $baseContentStreamId ); @@ -286,10 +285,10 @@ private function publishContentStream( } if (count($events) === 0) { - return null; + return; } try { - return $this->eventPersister->publishEvents( + $this->eventPersister->publishEvents( new EventsToPublish( $baseWorkspaceContentStreamName->getEventStreamName(), Events::fromArray($events), @@ -755,8 +754,6 @@ private function handleDiscardWorkspace( ) ); - // It is safe to only return the last command result, - // as the commands which were rebased are already executed "synchronously" return new EventsToPublish( $streamName, $events, diff --git a/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php b/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php index 63669814819..826460a31e0 100644 --- a/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php +++ b/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php @@ -89,8 +89,7 @@ public function executeMigration(ExecuteMigration $command): void } foreach ($command->migrationConfiguration->getMigration() as $migrationDescription) { - /** array $migrationDescription */ - $this->executeSubMigrationAndBlock( + $this->executeSubMigration( $migrationDescription, $sourceWorkspace, $targetWorkspace @@ -116,7 +115,7 @@ public function executeMigration(ExecuteMigration $command): void * @param array $migrationDescription * @throws MigrationException */ - protected function executeSubMigrationAndBlock( + protected function executeSubMigration( array $migrationDescription, Workspace $workspaceForReading, Workspace $workspaceForWriting, @@ -148,7 +147,7 @@ protected function executeSubMigrationAndBlock( } if ($transformations->containsGlobal()) { - $transformations->executeGlobalAndBlock($workspaceForWriting->workspaceName); + $transformations->executeGlobal($workspaceForWriting->workspaceName); } elseif ($transformations->containsNodeAggregateBased()) { $contentGraph = $this->contentRepository->getContentGraph($workspaceForReading->workspaceName); foreach ($contentGraph->findUsedNodeTypeNames() as $nodeTypeName) { @@ -158,7 +157,7 @@ protected function executeSubMigrationAndBlock( ) as $nodeAggregate ) { if ($filters->matchesNodeAggregate($nodeAggregate)) { - $transformations->executeNodeAggregateBasedAndBlock($nodeAggregate, $workspaceForWriting->workspaceName, $workspaceForWriting->currentContentStreamId); + $transformations->executeNodeAggregateBased($nodeAggregate, $workspaceForWriting->workspaceName, $workspaceForWriting->currentContentStreamId); } } } @@ -184,7 +183,7 @@ protected function executeSubMigrationAndBlock( ); if ($filters->matchesNode($node)) { - $transformations->executeNodeBasedAndBlock( + $transformations->executeNodeBased( $node, $coveredDimensionSpacePoints, $workspaceForWriting->workspaceName, diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php index 824dcae90a4..f8decab4901 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Command\AddDimensionShineThrough; @@ -50,8 +49,8 @@ public function __construct( public function execute( WorkspaceName $workspaceNameForWriting, - ): CommandResult { - return $this->contentRepository->handle( + ): void { + $this->contentRepository->handle( AddDimensionShineThrough::create( $workspaceNameForWriting, $this->from, diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php index 778d3cd8d14..b6ad21e946a 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; @@ -59,14 +58,14 @@ public function execute( DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): ?CommandResult { + ): void { if ($this->serializedValue === null) { // we don't need to unset a non-existing property - return null; + return; } if (!$node->hasProperty($this->newPropertyName)) { - return $this->contentRepository->handle( + $this->contentRepository->handle( SetSerializedNodeProperties::create( $workspaceNameForWriting, $node->aggregateId, @@ -81,8 +80,6 @@ public function execute( ) ); } - - return null; } }; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php index 2c584214551..42ec7df2b4c 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Feature\NodeTypeChange\Command\ChangeNodeAggregateType; use Neos\ContentRepository\Core\Feature\NodeTypeChange\Dto\NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy; @@ -65,8 +64,8 @@ public function execute( NodeAggregate $nodeAggregate, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): CommandResult { - return $this->contentRepository->handle(ChangeNodeAggregateType::create( + ): void { + $this->contentRepository->handle(ChangeNodeAggregateType::create( $workspaceNameForWriting, $nodeAggregate->nodeAggregateId, NodeTypeName::fromString($this->newType), diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php index 41712b0325c..c0b51852b6b 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; @@ -106,7 +105,7 @@ public function execute( DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): ?CommandResult { + ): void { $currentProperty = $node->properties->serialized()->getProperty($this->propertyName); if ($currentProperty !== null) { $value = $currentProperty->value; @@ -128,7 +127,7 @@ public function execute( $newValueWithReplacedCurrentValue ); - return $this->contentRepository->handle( + $this->contentRepository->handle( SetSerializedNodeProperties::create( $workspaceNameForWriting, $node->aggregateId, @@ -143,8 +142,6 @@ public function execute( ) ); } - - return null; } }; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php b/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php index a8017546f84..7fed0930401 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php @@ -14,8 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -27,5 +25,5 @@ interface GlobalTransformationInterface { public function execute( WorkspaceName $workspaceNameForWriting, - ): CommandResult; + ): void; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php index eeda40a3ea5..0b7cc1b7679 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Command\MoveDimensionSpacePoint; @@ -48,8 +47,8 @@ public function __construct( public function execute( WorkspaceName $workspaceNameForWriting, - ): CommandResult { - return $this->contentRepository->handle( + ): void { + $this->contentRepository->handle( MoveDimensionSpacePoint::create( $workspaceNameForWriting, $this->from, diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php index e5421f8114a..8b2ebd2787c 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; @@ -30,5 +29,5 @@ public function execute( NodeAggregate $nodeAggregate, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): CommandResult; + ): void; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php index 88a1573f674..1b2ab86ae4f 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; @@ -32,5 +31,5 @@ public function execute( DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): ?CommandResult; + ): void; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php index 53a2276fa3f..fbd0a2b46fa 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; @@ -66,7 +65,7 @@ public function execute( DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): ?CommandResult { + ): void { if ($this->strategy === null) { $this->strategy = NodeVariantSelectionStrategy::STRATEGY_ALL_SPECIALIZATIONS; } @@ -84,10 +83,10 @@ public function execute( if (!$coveredDimensionSpacePoints->contains($coveredDimensionSpacePoint)) { // we are currently in a Node which has other covered dimension space points than the target ones, // so we do not need to do anything. - return null; + return; } - return $this->contentRepository->handle(RemoveNodeAggregate::create( + $this->contentRepository->handle(RemoveNodeAggregate::create( $workspaceNameForWriting, $node->aggregateId, $coveredDimensionSpacePoint, diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php index 46d7e3255ca..c0990547e2d 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; @@ -54,9 +53,9 @@ public function execute( DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): ?CommandResult { + ): void { if ($node->hasProperty($this->propertyName)) { - return $this->contentRepository->handle( + $this->contentRepository->handle( SetSerializedNodeProperties::create( $workspaceNameForWriting, $node->aggregateId, @@ -66,8 +65,6 @@ public function execute( ) ); } - - return null; } }; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php index 207a34b3869..3e05d002d1b 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Feature\NodeRenaming\Command\ChangeNodeAggregateName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; @@ -50,8 +49,8 @@ public function execute( NodeAggregate $nodeAggregate, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): CommandResult { - return $this->contentRepository->handle(ChangeNodeAggregateName::create( + ): void { + $this->contentRepository->handle(ChangeNodeAggregateName::create( $workspaceNameForWriting, $nodeAggregate->nodeAggregateId, NodeName::fromString($this->newNodeName), diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php index 0d1cc13ed67..ff70a13bd7f 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; @@ -61,11 +60,11 @@ public function execute( DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): ?CommandResult + ): void { $serializedPropertyValue = $node->properties->serialized()->getProperty($this->from); if ($serializedPropertyValue !== null) { - return $this->contentRepository->handle( + $this->contentRepository->handle( SetSerializedNodeProperties::create( $workspaceNameForWriting, $node->aggregateId, @@ -77,8 +76,6 @@ public function execute( ) ); } - - return null; } }; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php index f071722b34f..9803c9509b2 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php @@ -14,7 +14,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; @@ -55,7 +54,7 @@ public function execute( DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting - ): ?CommandResult { + ): void { $serializedPropertyValue = $node->properties->serialized()->getProperty($this->propertyName); if ($serializedPropertyValue !== null) { $propertyValue = $serializedPropertyValue->value; @@ -66,7 +65,7 @@ public function execute( ); } $newValue = strip_tags($propertyValue); - return $this->contentRepository->handle( + $this->contentRepository->handle( SetSerializedNodeProperties::create( $workspaceNameForWriting, $node->aggregateId, @@ -81,8 +80,6 @@ public function execute( ) ); } - - return null; } }; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php b/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php index cd95b41e224..531a1d4969a 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php @@ -90,7 +90,7 @@ public function containsMoreThanOneTransformationType(): bool return $nonEmptyTransformationTypes > 1; } - public function executeGlobalAndBlock( + public function executeGlobal( WorkspaceName $workspaceNameForWriting, ): void { foreach ($this->globalTransformations as $globalTransformation) { @@ -98,7 +98,7 @@ public function executeGlobalAndBlock( } } - public function executeNodeAggregateBasedAndBlock( + public function executeNodeAggregateBased( NodeAggregate $nodeAggregate, WorkspaceName $workspaceNameForWriting, ContentStreamId $contentStreamForWriting @@ -108,7 +108,7 @@ public function executeNodeAggregateBasedAndBlock( } } - public function executeNodeBasedAndBlock( + public function executeNodeBased( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, WorkspaceName $workspaceNameForWriting, diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/UpdateRootNodeAggregateDimensionsTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/UpdateRootNodeAggregateDimensionsTransformationFactory.php index bf7a0e0f415..3b4b47867bb 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/UpdateRootNodeAggregateDimensionsTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/UpdateRootNodeAggregateDimensionsTransformationFactory.php @@ -4,7 +4,6 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; -use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Feature\RootNodeCreation\Command\UpdateRootNodeAggregateDimensions; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -47,7 +46,7 @@ public function __construct( public function execute( WorkspaceName $workspaceNameForWriting, - ): CommandResult { + ): void { $rootNodeAggregate = $this->contentRepository->getContentGraph($workspaceNameForWriting)->findRootNodeAggregateByType($this->nodeTypeName); @@ -58,7 +57,7 @@ public function execute( ); } - return $this->contentRepository->handle( + $this->contentRepository->handle( UpdateRootNodeAggregateDimensions::create( $workspaceNameForWriting, $rootNodeAggregate->nodeAggregateId diff --git a/Neos.Workspace.Ui/Classes/Controller/WorkspaceController.php b/Neos.Workspace.Ui/Classes/Controller/WorkspaceController.php index dac01978f21..b6f7b4553a5 100644 --- a/Neos.Workspace.Ui/Classes/Controller/WorkspaceController.php +++ b/Neos.Workspace.Ui/Classes/Controller/WorkspaceController.php @@ -572,8 +572,7 @@ public function publishOrDiscardNodesAction(array $nodes, string $action, string $selectedWorkspaceName, NodeIdsToPublishOrDiscard::create(...$nodesToPublishOrDiscard), ); - $contentRepository->handle($command) - ; + $contentRepository->handle($command); $this->addFlashMessage($this->translator->translateById( 'workspaces.selectedChangesHaveBeenPublished', [], @@ -588,8 +587,7 @@ public function publishOrDiscardNodesAction(array $nodes, string $action, string $selectedWorkspaceName, NodeIdsToPublishOrDiscard::create(...$nodesToPublishOrDiscard), ); - $contentRepository->handle($command) - ; + $contentRepository->handle($command); $this->addFlashMessage($this->translator->translateById( 'workspaces.selectedChangesHaveBeenDiscarded', [],