diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php index cd67ba3efcd..4b2a0247472 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php @@ -19,10 +19,10 @@ use Neos\ContentGraph\DoctrineDbalAdapter\DoctrineDbalContentGraphProjectionFactory; use Neos\ContentGraph\DoctrineDbalAdapter\DoctrineDbalContentGraphSchemaBuilder; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Tests\Behavior\Features\Helper\TestingNodeAggregateIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Tests\Behavior\Features\Helper\TestingNodeAggregateId; use Neos\ContentRepositoryRegistry\Infrastructure\DbalClient; use Neos\Flow\Utility\Algorithms; @@ -33,11 +33,11 @@ trait ProjectionIntegrityViolationDetectionTrait { private DbalClient $dbalClient; - abstract protected function getContentRepositoryIdentifier(): ContentRepositoryIdentifier; + abstract protected function getContentRepositoryId(): ContentRepositoryId; protected function getTableNamePrefix(): string { - return DoctrineDbalContentGraphProjectionFactory::graphProjectionTableNamePrefix($this->getContentRepositoryIdentifier()); + return DoctrineDbalContentGraphProjectionFactory::graphProjectionTableNamePrefix($this->getContentRepositoryId()); } public function setupDbalGraphAdapterIntegrityViolationTrait() @@ -74,7 +74,7 @@ public function iDetachTheFollowingRestrictionRelationFromItsOrigin(TableNode $p $this->dbalClient->getConnection()->update( $this->getTableNamePrefix() . '_restrictionrelation', [ - 'originnodeaggregateidentifier' => (string)TestingNodeAggregateIdentifier::nonExistent() + 'originnodeaggregateid' => (string)TestingNodeAggregateId::nonExistent() ], $record ); @@ -92,7 +92,7 @@ public function iDetachTheFollowingRestrictionRelationFromItsTarget(TableNode $p $this->dbalClient->getConnection()->update( $this->getTableNamePrefix() . '_restrictionrelation', [ - 'affectednodeaggregateidentifier' => (string)TestingNodeAggregateIdentifier::nonExistent() + 'affectednodeaggregateid' => (string)TestingNodeAggregateId::nonExistent() ], $record ); @@ -143,7 +143,7 @@ public function iSetTheFollowingPosition(TableNode $payloadTable): void $dataset = $this->transformPayloadTableToDataset($payloadTable); $dimensionSpacePoint = DimensionSpacePoint::fromArray($dataset['dimensionSpacePoint']); $record = [ - 'contentstreamidentifier' => $dataset['contentStreamIdentifier'], + 'contentstreamid' => $dataset['contentStreamId'], 'dimensionspacepointhash' => $dimensionSpacePoint->hash, 'childnodeanchor' => $this->findRelationAnchorPointByDataset($dataset) ]; @@ -197,12 +197,12 @@ private function transformDatasetToReferenceRelationRecord(array $dataset): arra { return [ 'name' => $dataset['referenceName'], - 'nodeanchorpoint' => $this->findRelationAnchorPointByIdentifiers( - ContentStreamIdentifier::fromString($dataset['contentStreamIdentifier']), + 'nodeanchorpoint' => $this->findRelationAnchorPointByIds( + ContentStreamId::fromString($dataset['contentStreamId']), DimensionSpacePoint::fromArray($dataset['dimensionSpacePoint']), - NodeAggregateIdentifier::fromString($dataset['sourceNodeAggregateIdentifier']) + NodeAggregateId::fromString($dataset['sourceNodeAggregateId']) ), - 'destinationnodeaggregateidentifier' => $dataset['destinationNodeAggregateIdentifier'] + 'destinationnodeaggregateid' => $dataset['destinationNodeAggregateId'] ]; } @@ -211,36 +211,36 @@ private function transformDatasetToRestrictionRelationRecord(array $dataset): ar $dimensionSpacePoint = DimensionSpacePoint::fromArray($dataset['dimensionSpacePoint']); return [ - 'contentstreamidentifier' => $dataset['contentStreamIdentifier'], + 'contentstreamid' => $dataset['contentStreamId'], 'dimensionspacepointhash' => $dimensionSpacePoint->hash, - 'originnodeaggregateidentifier' => $dataset['originNodeAggregateIdentifier'], - 'affectednodeaggregateidentifier' => $dataset['affectedNodeAggregateIdentifier'], + 'originnodeaggregateid' => $dataset['originNodeAggregateId'], + 'affectednodeaggregateid' => $dataset['affectedNodeAggregateId'], ]; } private function transformDatasetToHierarchyRelationRecord(array $dataset): array { $dimensionSpacePoint = DimensionSpacePoint::fromArray($dataset['dimensionSpacePoint']); - $parentNodeAggregateIdentifier = TestingNodeAggregateIdentifier::fromString($dataset['parentNodeAggregateIdentifier']); - $childAggregateIdentifier = TestingNodeAggregateIdentifier::fromString($dataset['childNodeAggregateIdentifier']); + $parentNodeAggregateId = TestingNodeAggregateId::fromString($dataset['parentNodeAggregateId']); + $childAggregateId = TestingNodeAggregateId::fromString($dataset['childNodeAggregateId']); return [ - 'contentstreamidentifier' => $dataset['contentStreamIdentifier'], + 'contentstreamid' => $dataset['contentStreamId'], 'dimensionspacepoint' => \json_encode($dimensionSpacePoint), 'dimensionspacepointhash' => $dimensionSpacePoint->hash, - 'parentnodeanchor' => $parentNodeAggregateIdentifier->isNonExistent() + 'parentnodeanchor' => $parentNodeAggregateId->isNonExistent() ? Algorithms::generateUUID() - : $this->findRelationAnchorPointByIdentifiers( - ContentStreamIdentifier::fromString($dataset['contentStreamIdentifier']), + : $this->findRelationAnchorPointByIds( + ContentStreamId::fromString($dataset['contentStreamId']), $dimensionSpacePoint, - NodeAggregateIdentifier::fromString($dataset['parentNodeAggregateIdentifier']) + NodeAggregateId::fromString($dataset['parentNodeAggregateId']) ), - 'childnodeanchor' => $childAggregateIdentifier->isNonExistent() + 'childnodeanchor' => $childAggregateId->isNonExistent() ? Algorithms::generateUUID() - : $this->findRelationAnchorPointByIdentifiers( - ContentStreamIdentifier::fromString($dataset['contentStreamIdentifier']), + : $this->findRelationAnchorPointByIds( + ContentStreamId::fromString($dataset['contentStreamId']), $dimensionSpacePoint, - NodeAggregateIdentifier::fromString($dataset['childNodeAggregateIdentifier']) + NodeAggregateId::fromString($dataset['childNodeAggregateId']) ), 'position' => $dataset['position'] ?? 0 ]; @@ -250,30 +250,30 @@ private function findRelationAnchorPointByDataset(array $dataset): string { $dimensionSpacePoint = DimensionSpacePoint::fromArray($dataset['originDimensionSpacePoint'] ?? $dataset['dimensionSpacePoint']); - return $this->findRelationAnchorPointByIdentifiers( - ContentStreamIdentifier::fromString($dataset['contentStreamIdentifier']), + return $this->findRelationAnchorPointByIds( + ContentStreamId::fromString($dataset['contentStreamId']), $dimensionSpacePoint, - NodeAggregateIdentifier::fromString($dataset['nodeAggregateIdentifier'] ?? $dataset['childNodeAggregateIdentifier']) + NodeAggregateId::fromString($dataset['nodeAggregateId'] ?? $dataset['childNodeAggregateId']) ); } - private function findRelationAnchorPointByIdentifiers( - ContentStreamIdentifier $contentStreamIdentifier, + private function findRelationAnchorPointByIds( + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateId ): string { $nodeRecord = $this->dbalClient->getConnection()->executeQuery( 'SELECT n.relationanchorpoint FROM ' . $this->getTableNamePrefix() . '_node n INNER JOIN ' . $this->getTableNamePrefix() . '_hierarchyrelation h ON n.relationanchorpoint = h.childnodeanchor - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + WHERE n.nodeaggregateid = :nodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier + 'nodeAggregateId' => (string)$nodeAggregateId ] )->fetchAssociative(); diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Projection/ProjectionIntegrityViolationDetection/NodesHaveAtMostOneParentPerSubgraph.feature b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Projection/ProjectionIntegrityViolationDetection/NodesHaveAtMostOneParentPerSubgraph.feature index 48e196d4ee7..020f30b54c3 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Projection/ProjectionIntegrityViolationDetection/NodesHaveAtMostOneParentPerSubgraph.feature +++ b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Projection/ProjectionIntegrityViolationDetection/NodesHaveAtMostOneParentPerSubgraph.feature @@ -13,60 +13,60 @@ Feature: Run integrity violation detection regarding parent relations 'Neos.ContentRepository.Testing:Document': [] """ And the command CreateRootWorkspace is executed with payload: - | Key | Value | - | workspaceName | "live" | - | workspaceTitle | "Live" | - | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | Key | Value | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The live workspace" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language":"de"} | - | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | nodeName | "document" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language":"de"} | + | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | + | parentnodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "document" | + | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language":"de"} | - | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | nodeName | "esquire" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language":"de"} | + | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | + | parentnodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "esquire" | + | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language":"de"} | - | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | - | nodeName | "child-document" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language":"de"} | + | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | + | parentnodeAggregateId | "sir-david-nodenborough" | + | nodeName | "child-document" | + | nodeAggregateClassification | "regular" | And the graph projection is fully up to date Scenario: Set a second parent for Nody McNodeface And I add the following hierarchy relation: - | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | dimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | childNodeAggregateIdentifier | "nody-mc-nodeface" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | dimensionSpacePoint | {"language":"de"} | + | parentnodeAggregateId | "sir-nodeward-nodington-iii" | + | childnodeAggregateId | "nody-mc-nodeface" | And I run integrity violation detection Then I expect the integrity violation detection result to contain exactly 1 error And I expect integrity violation detection result error number 1 to have code 1597925698 diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php index 73780695f61..2ce39ca4e8f 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php @@ -47,12 +47,12 @@ use Neos\ContentRepository\Core\Projection\ProjectionInterface; use Neos\ContentRepository\Core\Projection\WithMarkStaleInterface; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\EventStore\CatchUp\CatchUp; use Neos\EventStore\DoctrineAdapter\DoctrineCheckpointStorage; use Neos\EventStore\Model\Event; @@ -278,7 +278,7 @@ private function whenRootNodeAggregateWithNodeWasCreated(RootNodeAggregateWithNo $dimensionSpacePoint = DimensionSpacePoint::fromArray([]); $node = new NodeRecord( $nodeRelationAnchorPoint, - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $dimensionSpacePoint->coordinates, $dimensionSpacePoint->hash, SerializedPropertyValues::fromArray([]), @@ -289,7 +289,7 @@ private function whenRootNodeAggregateWithNodeWasCreated(RootNodeAggregateWithNo $this->transactional(function () use ($node, $event) { $node->addToDatabase($this->getDatabaseConnection(), $this->tableNamePrefix); $this->connectHierarchy( - $event->contentStreamIdentifier, + $event->contentStreamId, NodeRelationAnchorPoint::forRootEdge(), $node->relationAnchorPoint, $event->coveredDimensionSpacePoints, @@ -305,22 +305,22 @@ private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCre { $this->transactional(function () use ($event) { $this->createNodeWithHierarchy( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->nodeTypeName, - $event->parentNodeAggregateIdentifier, + $event->parentNodeAggregateId, $event->originDimensionSpacePoint, $event->coveredDimensionSpacePoints, $event->initialPropertyValues, $event->nodeAggregateClassification, - $event->succeedingNodeAggregateIdentifier, + $event->succeedingNodeAggregateId, $event->nodeName ); $this->connectRestrictionRelationsFromParentNodeToNewlyCreatedNode( - $event->contentStreamIdentifier, - $event->parentNodeAggregateIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->parentNodeAggregateId, + $event->nodeAggregateId, $event->coveredDimensionSpacePoints ); }); @@ -339,12 +339,12 @@ private function whenNodeAggregateNameWasChanged(NodeAggregateNameWasChanged $ev SET h.name = :newName WHERE - n.nodeaggregateidentifier = :nodeAggregateIdentifier - and h.contentstreamidentifier = :contentStreamIdentifier + n.nodeaggregateid = :nodeAggregateId + and h.contentstreamid = :contentStreamId ', [ 'newName' => (string)$event->newNodeName, - 'nodeAggregateIdentifier' => (string)$event->nodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'nodeAggregateId' => (string)$event->nodeAggregateId, + 'contentStreamId' => (string)$event->contentStreamId ]); }); } @@ -355,36 +355,36 @@ private function whenNodeAggregateNameWasChanged(NodeAggregateNameWasChanged $ev * @throws \Doctrine\DBAL\DBALException */ private function connectRestrictionRelationsFromParentNodeToNewlyCreatedNode( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, - NodeAggregateIdentifier $newlyCreatedNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId, + NodeAggregateId $newlyCreatedNodeAggregateId, DimensionSpacePointSet $dimensionSpacePointsInWhichNewlyCreatedNodeAggregateIsVisible ): void { // TODO: still unsure why we need an "INSERT IGNORE" here; // normal "INSERT" can trigger a duplicate key constraint exception $this->getDatabaseConnection()->executeUpdate(' INSERT IGNORE INTO ' . $this->tableNamePrefix . '_restrictionrelation ( - contentstreamidentifier, + contentstreamid, dimensionspacepointhash, - originnodeaggregateidentifier, - affectednodeaggregateidentifier + originnodeaggregateid, + affectednodeaggregateid ) SELECT - r.contentstreamidentifier, + r.contentstreamid, r.dimensionspacepointhash, - r.originnodeaggregateidentifier, - "' . $newlyCreatedNodeAggregateIdentifier . '" as affectednodeaggregateidentifier + r.originnodeaggregateid, + "' . $newlyCreatedNodeAggregateId . '" as affectednodeaggregateid FROM ' . $this->tableNamePrefix . '_restrictionrelation r WHERE - r.contentstreamidentifier = :sourceContentStreamIdentifier + r.contentstreamid = :sourceContentStreamId and r.dimensionspacepointhash IN (:visibleDimensionSpacePoints) - and r.affectednodeaggregateidentifier = :parentNodeAggregateIdentifier + and r.affectednodeaggregateid = :parentNodeAggregateId ', [ - 'sourceContentStreamIdentifier' => (string)$contentStreamIdentifier, + 'sourceContentStreamId' => (string)$contentStreamId, 'visibleDimensionSpacePoints' => $dimensionSpacePointsInWhichNewlyCreatedNodeAggregateIsVisible ->getPointHashes(), - 'parentNodeAggregateIdentifier' => (string)$parentNodeAggregateIdentifier + 'parentNodeAggregateId' => (string)$parentNodeAggregateId ], [ 'visibleDimensionSpacePoints' => Connection::PARAM_STR_ARRAY ]); @@ -394,21 +394,21 @@ private function connectRestrictionRelationsFromParentNodeToNewlyCreatedNode( * @throws \Doctrine\DBAL\DBALException */ private function createNodeWithHierarchy( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, NodeTypeName $nodeTypeName, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint, DimensionSpacePointSet $visibleInDimensionSpacePoints, SerializedPropertyValues $propertyDefaultValuesAndTypes, NodeAggregateClassification $nodeAggregateClassification, - NodeAggregateIdentifier $succeedingSiblingNodeAggregateIdentifier = null, + NodeAggregateId $succeedingSiblingNodeAggregateId = null, NodeName $nodeName = null ): void { $nodeRelationAnchorPoint = NodeRelationAnchorPoint::create(); $node = new NodeRecord( $nodeRelationAnchorPoint, - $nodeAggregateIdentifier, + $nodeAggregateId, $originDimensionSpacePoint->jsonSerialize(), $originDimensionSpacePoint->hash, $propertyDefaultValuesAndTypes, @@ -425,22 +425,22 @@ private function createNodeWithHierarchy( foreach ($missingParentRelations as $dimensionSpacePoint) { $parentNode = $this->projectionContentGraph->findNodeInAggregate( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $contentStreamId, + $parentNodeAggregateId, $dimensionSpacePoint ); - $succeedingSibling = $succeedingSiblingNodeAggregateIdentifier + $succeedingSibling = $succeedingSiblingNodeAggregateId ? $this->projectionContentGraph->findNodeInAggregate( - $contentStreamIdentifier, - $succeedingSiblingNodeAggregateIdentifier, + $contentStreamId, + $succeedingSiblingNodeAggregateId, $dimensionSpacePoint ) : null; if ($parentNode) { $this->connectHierarchy( - $contentStreamIdentifier, + $contentStreamId, $parentNode->relationAnchorPoint, $nodeRelationAnchorPoint, new DimensionSpacePointSet([$dimensionSpacePoint]), @@ -459,12 +459,12 @@ private function createNodeWithHierarchy( * @param NodeRelationAnchorPoint $childNodeAnchorPoint * @param NodeRelationAnchorPoint|null $succeedingSiblingNodeAnchorPoint * @param NodeName|null $relationName - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePointSet $dimensionSpacePointSet * @throws \Doctrine\DBAL\DBALException */ protected function connectHierarchy( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeRelationAnchorPoint $parentNodeAnchorPoint, NodeRelationAnchorPoint $childNodeAnchorPoint, DimensionSpacePointSet $dimensionSpacePointSet, @@ -476,7 +476,7 @@ protected function connectHierarchy( $parentNodeAnchorPoint, null, $succeedingSiblingNodeAnchorPoint, - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint ); @@ -484,7 +484,7 @@ protected function connectHierarchy( $parentNodeAnchorPoint, $childNodeAnchorPoint, $relationName, - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint, $dimensionSpacePoint->hash, $position @@ -498,7 +498,7 @@ protected function connectHierarchy( * @param NodeRelationAnchorPoint|null $parentAnchorPoint * @param NodeRelationAnchorPoint|null $childAnchorPoint * @param NodeRelationAnchorPoint|null $succeedingSiblingAnchorPoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePoint $dimensionSpacePoint * @return int * @throws \Doctrine\DBAL\DBALException @@ -507,14 +507,14 @@ protected function getRelationPosition( ?NodeRelationAnchorPoint $parentAnchorPoint, ?NodeRelationAnchorPoint $childAnchorPoint, ?NodeRelationAnchorPoint $succeedingSiblingAnchorPoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint ): int { $position = $this->projectionContentGraph->determineHierarchyRelationPosition( $parentAnchorPoint, $childAnchorPoint, $succeedingSiblingAnchorPoint, - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint ); @@ -523,7 +523,7 @@ protected function getRelationPosition( $parentAnchorPoint, $childAnchorPoint, $succeedingSiblingAnchorPoint, - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint ); } @@ -535,7 +535,7 @@ protected function getRelationPosition( * @param NodeRelationAnchorPoint|null $parentAnchorPoint * @param NodeRelationAnchorPoint|null $childAnchorPoint * @param NodeRelationAnchorPoint|null $succeedingSiblingAnchorPoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePoint $dimensionSpacePoint * @return int * @throws \Doctrine\DBAL\DBALException @@ -544,7 +544,7 @@ protected function getRelationPositionAfterRecalculation( ?NodeRelationAnchorPoint $parentAnchorPoint, ?NodeRelationAnchorPoint $childAnchorPoint, ?NodeRelationAnchorPoint $succeedingSiblingAnchorPoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint ): int { if (!$childAnchorPoint && !$parentAnchorPoint) { @@ -559,12 +559,12 @@ protected function getRelationPositionAfterRecalculation( $hierarchyRelations = $parentAnchorPoint ? $this->projectionContentGraph->getOutgoingHierarchyRelationsForNodeAndSubgraph( $parentAnchorPoint, - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint ) : $this->projectionContentGraph->getIngoingHierarchyRelationsForNodeAndSubgraph( $childAnchorPoint, - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint ); @@ -601,7 +601,7 @@ public function whenContentStreamWasForked(ContentStreamWasForked $event): void position, dimensionspacepoint, dimensionspacepointhash, - contentstreamidentifier + contentstreamid ) SELECT h.parentnodeanchor, @@ -610,12 +610,12 @@ public function whenContentStreamWasForked(ContentStreamWasForked $event): void h.position, h.dimensionspacepoint, h.dimensionspacepointhash, - "' . $event->newContentStreamIdentifier . '" AS contentstreamidentifier + "' . $event->newContentStreamId . '" AS contentstreamid FROM ' . $this->tableNamePrefix . '_hierarchyrelation h - WHERE h.contentstreamidentifier = :sourceContentStreamIdentifier + WHERE h.contentstreamid = :sourceContentStreamId ', [ - 'sourceContentStreamIdentifier' => (string)$event->sourceContentStreamIdentifier + 'sourceContentStreamId' => (string)$event->sourceContentStreamId ]); // @@ -623,21 +623,21 @@ public function whenContentStreamWasForked(ContentStreamWasForked $event): void // $this->getDatabaseConnection()->executeUpdate(' INSERT INTO ' . $this->tableNamePrefix . '_restrictionrelation ( - contentstreamidentifier, + contentstreamid, dimensionspacepointhash, - originnodeaggregateidentifier, - affectednodeaggregateidentifier + originnodeaggregateid, + affectednodeaggregateid ) SELECT - "' . $event->newContentStreamIdentifier . '" AS contentstreamidentifier, + "' . $event->newContentStreamId . '" AS contentstreamid, r.dimensionspacepointhash, - r.originnodeaggregateidentifier, - r.affectednodeaggregateidentifier + r.originnodeaggregateid, + r.affectednodeaggregateid FROM ' . $this->tableNamePrefix . '_restrictionrelation r - WHERE r.contentstreamidentifier = :sourceContentStreamIdentifier + WHERE r.contentstreamid = :sourceContentStreamId ', [ - 'sourceContentStreamIdentifier' => (string)$event->sourceContentStreamIdentifier + 'sourceContentStreamId' => (string)$event->sourceContentStreamId ]); // NOTE: as reference edges are attached to Relation Anchor Points (and they are lazily copy-on-written), @@ -653,9 +653,9 @@ public function whenContentStreamWasRemoved(ContentStreamWasRemoved $event): voi $this->getDatabaseConnection()->executeUpdate(' DELETE FROM ' . $this->tableNamePrefix . '_hierarchyrelation WHERE - contentstreamidentifier = :contentStreamIdentifier + contentstreamid = :contentStreamId ', [ - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'contentStreamId' => (string)$event->contentStreamId ]); // Drop non-referenced nodes (which do not have a hierarchy relation anymore) @@ -684,9 +684,9 @@ public function whenContentStreamWasRemoved(ContentStreamWasRemoved $event): voi $this->getDatabaseConnection()->executeUpdate(' DELETE FROM ' . $this->tableNamePrefix . '_restrictionrelation WHERE - contentstreamidentifier = :contentStreamIdentifier + contentstreamid = :contentStreamId ', [ - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'contentStreamId' => (string)$event->contentStreamId ]); }); } @@ -712,23 +712,23 @@ public function whenNodeReferencesWereSet(NodeReferencesWereSet $event): void foreach ($event->affectedSourceOriginDimensionSpacePoints as $originDimensionSpacePoint) { $nodeAnchorPoint = $this->projectionContentGraph ->getAnchorPointForNodeAndOriginDimensionSpacePointAndContentStream( - $event->sourceNodeAggregateIdentifier, + $event->sourceNodeAggregateId, $originDimensionSpacePoint, - $event->contentStreamIdentifier + $event->contentStreamId ); if (is_null($nodeAnchorPoint)) { throw new \InvalidArgumentException( 'Could not apply event of type "' . get_class($event) . '" since no anchor point could be resolved for node ' - . $event->getNodeAggregateIdentifier() . ' in content stream ' - . $event->getContentStreamIdentifier(), + . $event->getNodeAggregateId() . ' in content stream ' + . $event->getContentStreamId(), 1658580583 ); } $this->updateNodeRecordWithCopyOnWrite( - $event->contentStreamIdentifier, + $event->contentStreamId, $nodeAnchorPoint, function (NodeRecord $node) { } @@ -736,9 +736,9 @@ function (NodeRecord $node) { $nodeAnchorPoint = $this->projectionContentGraph ->getAnchorPointForNodeAndOriginDimensionSpacePointAndContentStream( - $event->sourceNodeAggregateIdentifier, + $event->sourceNodeAggregateId, $originDimensionSpacePoint, - $event->contentStreamIdentifier + $event->contentStreamId ); // remove old @@ -754,7 +754,7 @@ function (NodeRecord $node) { 'name' => $event->referenceName, 'position' => $position, 'nodeanchorpoint' => $nodeAnchorPoint, - 'destinationnodeaggregateidentifier' => $reference->targetNodeAggregateIdentifier, + 'destinationnodeaggregateid' => $reference->targetNodeAggregateId, 'properties' => $reference->properties ? \json_encode($reference->properties, JSON_THROW_ON_ERROR) : null @@ -766,9 +766,9 @@ function (NodeRecord $node) { } private function cascadeRestrictionRelations( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, - NodeAggregateIdentifier $entryNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId, + NodeAggregateId $entryNodeAggregateId, DimensionSpacePointSet $affectedDimensionSpacePoints ): void { $this->getDatabaseConnection()->executeUpdate( @@ -776,66 +776,71 @@ private function cascadeRestrictionRelations( -- GraphProjector::cascadeRestrictionRelations INSERT INTO ' . $this->tableNamePrefix . '_restrictionrelation ( - -- we build a recursive tree - with recursive tree as ( - -- -------------------------------- - -- INITIAL query: select the nodes of the given entry node aggregate as roots of the tree - -- -------------------------------- - select - n.relationanchorpoint, - n.nodeaggregateidentifier, - h.dimensionspacepointhash - from - ' . $this->tableNamePrefix . '_node n - -- we need to join with the hierarchy relation, because we need the dimensionspacepointhash. - inner join ' . $this->tableNamePrefix . '_hierarchyrelation h - on h.childnodeanchor = n.relationanchorpoint - where - n.nodeaggregateidentifier = :entryNodeAggregateIdentifier - and h.contentstreamidentifier = :contentStreamIdentifier - and h.dimensionspacepointhash in (:dimensionSpacePointHashes) - union - -- -------------------------------- - -- RECURSIVE query: do one "child" query step - -- -------------------------------- - select - c.relationanchorpoint, - c.nodeaggregateidentifier, - h.dimensionspacepointhash - from - tree p - inner join ' . $this->tableNamePrefix . '_hierarchyrelation h - on h.parentnodeanchor = p.relationanchorpoint - inner join ' . $this->tableNamePrefix . '_node c - on h.childnodeanchor = c.relationanchorpoint - where - h.contentstreamidentifier = :contentStreamIdentifier - and h.dimensionspacepointhash in (:dimensionSpacePointHashes) - ) + contentstreamid, + dimensionspacepointhash, + originnodeaggregateid, + affectednodeaggregateid + ) + -- we build a recursive tree + with recursive tree as ( + -- -------------------------------- + -- INITIAL query: select the nodes of the given entry node aggregate as roots of the tree + -- -------------------------------- + select + n.relationanchorpoint, + n.nodeaggregateid, + h.dimensionspacepointhash + from + ' . $this->tableNamePrefix . '_node n + -- we need to join with the hierarchy relation, because we need the dimensionspacepointhash. + inner join ' . $this->tableNamePrefix . '_hierarchyrelation h + on h.childnodeanchor = n.relationanchorpoint + where + n.nodeaggregateid = :entryNodeAggregateId + and h.contentstreamid = :contentStreamId + and h.dimensionspacepointhash in (:dimensionSpacePointHashes) + union + -- -------------------------------- + -- RECURSIVE query: do one "child" query step + -- -------------------------------- + select + c.relationanchorpoint, + c.nodeaggregateid, + h.dimensionspacepointhash + from + tree p + inner join ' . $this->tableNamePrefix . '_hierarchyrelation h + on h.parentnodeanchor = p.relationanchorpoint + inner join ' . $this->tableNamePrefix . '_node c + on h.childnodeanchor = c.relationanchorpoint + where + h.contentstreamid = :contentStreamId + and h.dimensionspacepointhash in (:dimensionSpacePointHashes) + ) - -- -------------------------------- - -- create new restriction relations... - -- -------------------------------- - SELECT - "' . (string)$contentStreamIdentifier . '" as contentstreamidentifier, - tree.dimensionspacepointhash, - originnodeaggregateidentifier, - tree.nodeaggregateidentifier as affectednodeaggregateidentifier - FROM tree - -- -------------------------------- - -- ...by joining the tree with all restriction relations ingoing to the given parent - -- -------------------------------- - INNER JOIN ( - SELECT originnodeaggregateidentifier FROM ' . $this->tableNamePrefix . '_restrictionrelation - WHERE contentstreamidentifier = :contentStreamIdentifier - AND affectednodeaggregateidentifier = :parentNodeAggregateIdentifier - AND dimensionspacepointhash IN (:affectedDimensionSpacePointHashes) - ) AS joinedrestrictingancestors - )', + -- -------------------------------- + -- create new restriction relations... + -- -------------------------------- + SELECT + "' . (string)$contentStreamId . '" as contentstreamid, + tree.dimensionspacepointhash, + originnodeaggregateid, + tree.nodeaggregateid as affectednodeaggregateid + FROM tree + -- -------------------------------- + -- ...by joining the tree with all restriction relations ingoing to the given parent + -- -------------------------------- + INNER JOIN ( + SELECT originnodeaggregateid FROM ' . $this->tableNamePrefix . '_restrictionrelation + WHERE contentstreamid = :contentStreamId + AND affectednodeaggregateid = :parentNodeAggregateId + AND dimensionspacepointhash IN (:affectedDimensionSpacePointHashes) + ) AS joinedrestrictingancestors + ', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'parentNodeAggregateIdentifier' => (string)$parentNodeAggregateIdentifier, - 'entryNodeAggregateIdentifier' => (string)$entryNodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'parentNodeAggregateId' => (string)$parentNodeAggregateId, + 'entryNodeAggregateId' => (string)$entryNodeAggregateId, 'dimensionSpacePointHashes' => $affectedDimensionSpacePoints->getPointHashes(), 'affectedDimensionSpacePointHashes' => $affectedDimensionSpacePoints->getPointHashes() ], @@ -853,8 +858,8 @@ public function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): voi { $this->transactional(function () use ($event) { $this->removeOutgoingRestrictionRelationsOfNodeAggregateInDimensionSpacePoints( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->affectedDimensionSpacePoints ); }); @@ -862,7 +867,7 @@ public function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): voi /** * @param HierarchyRelation $sourceHierarchyRelation - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePoint $dimensionSpacePoint * @param NodeRelationAnchorPoint|null $newParent * @param NodeRelationAnchorPoint|null $newChild @@ -871,7 +876,7 @@ public function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): voi */ protected function copyHierarchyRelationToDimensionSpacePoint( HierarchyRelation $sourceHierarchyRelation, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, ?NodeRelationAnchorPoint $newParent = null, ?NodeRelationAnchorPoint $newChild = null @@ -880,14 +885,14 @@ protected function copyHierarchyRelationToDimensionSpacePoint( $newParent ?: $sourceHierarchyRelation->parentNodeAnchor, $newChild ?: $sourceHierarchyRelation->childNodeAnchor, $sourceHierarchyRelation->name, - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint, $dimensionSpacePoint->hash, $this->getRelationPosition( $newParent ?: $sourceHierarchyRelation->parentNodeAnchor, $newChild ?: $sourceHierarchyRelation->childNodeAnchor, null, // todo: find proper sibling - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint ) ); @@ -906,7 +911,7 @@ protected function copyNodeToDimensionSpacePoint( $copyRelationAnchorPoint = NodeRelationAnchorPoint::create(); $copy = new NodeRecord( $copyRelationAnchorPoint, - $sourceNode->nodeAggregateIdentifier, + $sourceNode->nodeAggregateId, $originDimensionSpacePoint->jsonSerialize(), $originDimensionSpacePoint->hash, $sourceNode->properties, @@ -923,13 +928,13 @@ public function whenNodeAggregateTypeWasChanged(NodeAggregateTypeWasChanged $eve { $this->transactional(function () use ($event) { $anchorPoints = $this->projectionContentGraph->getAnchorPointsForNodeAggregateInContentStream( - $event->nodeAggregateIdentifier, - $event->contentStreamIdentifier + $event->nodeAggregateId, + $event->contentStreamId ); foreach ($anchorPoints as $anchorPoint) { $this->updateNodeRecordWithCopyOnWrite( - $event->contentStreamIdentifier, + $event->contentStreamId, $anchorPoint, function (NodeRecord $node) use ($event) { $node->nodeTypeName = $event->newNodeTypeName; @@ -946,21 +951,21 @@ function (NodeRecord $node) use ($event) { protected function updateNodeWithCopyOnWrite(EventInterface $event, callable $operations): mixed { if ( - method_exists($event, 'getNodeAggregateIdentifier') + method_exists($event, 'getNodeAggregateId') && method_exists($event, 'getOriginDimensionSpacePoint') - && method_exists($event, 'getContentStreamIdentifier') + && method_exists($event, 'getContentStreamId') ) { $anchorPoint = $this->projectionContentGraph ->getAnchorPointForNodeAndOriginDimensionSpacePointAndContentStream( - $event->getNodeAggregateIdentifier(), + $event->getNodeAggregateId(), $event->getOriginDimensionSpacePoint(), - $event->getContentStreamIdentifier() + $event->getContentStreamId() ); } else { throw new \InvalidArgumentException( 'Cannot update node with copy on write for events of type ' - . get_class($event) . ' since they provide no NodeAggregateIdentifier, ' - . 'OriginDimensionSpacePoint or ContentStreamIdentifier', + . get_class($event) . ' since they provide no NodeAggregateId, ' + . 'OriginDimensionSpacePoint or ContentStreamId', 1645303167 ); } @@ -968,27 +973,27 @@ protected function updateNodeWithCopyOnWrite(EventInterface $event, callable $op if (is_null($anchorPoint)) { throw new \InvalidArgumentException( 'Cannot update node with copy on write since no anchor point could be resolved for node ' - . $event->getNodeAggregateIdentifier() . ' in content stream ' - . $event->getContentStreamIdentifier(), + . $event->getNodeAggregateId() . ' in content stream ' + . $event->getContentStreamId(), 1645303332 ); } return $this->updateNodeRecordWithCopyOnWrite( - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $anchorPoint, $operations ); } protected function updateNodeRecordWithCopyOnWrite( - ContentStreamIdentifier $contentStreamIdentifierWhereWriteOccurs, + ContentStreamId $contentStreamIdWhereWriteOccurs, NodeRelationAnchorPoint $anchorPoint, callable $operations ): mixed { - $contentStreamIdentifiers = $this->projectionContentGraph - ->getAllContentStreamIdentifiersAnchorPointIsContainedIn($anchorPoint); - if (count($contentStreamIdentifiers) > 1) { + $contentStreamIds = $this->projectionContentGraph + ->getAllContentStreamIdsAnchorPointIsContainedIn($anchorPoint); + if (count($contentStreamIds) > 1) { // Copy on Write needed! // Copy on Write is a purely "Content Stream" related concept; // thus we do not care about different DimensionSpacePoints here (but we copy all edges) @@ -1015,11 +1020,11 @@ protected function updateNodeRecordWithCopyOnWrite( = IF(h.parentnodeanchor = :originalNodeAnchor, :newNodeAnchor, h.parentnodeanchor) WHERE :originalNodeAnchor IN (h.childnodeanchor, h.parentnodeanchor) - AND h.contentstreamidentifier = :contentStreamIdentifier', + AND h.contentstreamid = :contentStreamId', [ 'newNodeAnchor' => (string)$copiedNode->relationAnchorPoint, 'originalNodeAnchor' => (string)$anchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifierWhereWriteOccurs + 'contentStreamId' => (string)$contentStreamIdWhereWriteOccurs ] ); @@ -1052,13 +1057,13 @@ protected function copyReferenceRelations( nodeanchorpoint, name, position, - destinationnodeaggregateidentifier + destinationnodeaggregateid ) SELECT :destinationRelationAnchorPoint AS nodeanchorpoint, ref.name, ref.position, - ref.destinationnodeaggregateidentifier + ref.destinationnodeaggregateid FROM ' . $this->tableNamePrefix . '_referencerelation ref WHERE ref.nodeanchorpoint = :sourceNodeAnchorPoint @@ -1081,7 +1086,7 @@ public function whenDimensionSpacePointWasMoved(DimensionSpacePointWasMoved $eve INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash -- find only nodes which have their ORIGIN at the source DimensionSpacePoint, -- as we need to rewrite these origins (using copy on write) @@ -1089,13 +1094,13 @@ public function whenDimensionSpacePointWasMoved(DimensionSpacePointWasMoved $eve ', [ 'dimensionSpacePointHash' => $event->source->hash, - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'contentStreamId' => (string)$event->contentStreamId ] ); while ($res = $rel->fetchAssociative()) { $relationAnchorPoint = NodeRelationAnchorPoint::fromString($res['relationanchorpoint']); $this->updateNodeRecordWithCopyOnWrite( - $event->contentStreamIdentifier, + $event->contentStreamId, $relationAnchorPoint, function (NodeRecord $nodeRecord) use ($event) { $nodeRecord->originDimensionSpacePoint = $event->target->jsonSerialize(); @@ -1113,13 +1118,13 @@ function (NodeRecord $nodeRecord) use ($event) { h.dimensionspacepointhash = :newDimensionSpacePointHash WHERE h.dimensionspacepointhash = :originalDimensionSpacePointHash - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId ', [ 'originalDimensionSpacePointHash' => $event->source->hash, 'newDimensionSpacePointHash' => $event->target->hash, 'newDimensionSpacePoint' => json_encode($event->target->jsonSerialize()), - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'contentStreamId' => (string)$event->contentStreamId ] ); @@ -1131,12 +1136,12 @@ function (NodeRecord $nodeRecord) use ($event) { r.dimensionspacepointhash = :newDimensionSpacePointHash WHERE r.dimensionspacepointhash = :originalDimensionSpacePointHash - AND r.contentstreamidentifier = :contentStreamIdentifier + AND r.contentstreamid = :contentStreamId ', [ 'originalDimensionSpacePointHash' => $event->source->hash, 'newDimensionSpacePointHash' => $event->target->hash, - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'contentStreamId' => (string)$event->contentStreamId ] ); }); @@ -1155,7 +1160,7 @@ public function whenDimensionShineThroughWasAdded(DimensionShineThroughWasAdded position, dimensionspacepoint, dimensionspacepointhash, - contentstreamidentifier + contentstreamid ) SELECT h.parentnodeanchor, @@ -1164,13 +1169,13 @@ public function whenDimensionShineThroughWasAdded(DimensionShineThroughWasAdded h.position, :newDimensionSpacePoint AS dimensionspacepoint, :newDimensionSpacePointHash AS dimensionspacepointhash, - h.contentstreamidentifier + h.contentstreamid FROM ' . $this->tableNamePrefix . '_hierarchyrelation h - WHERE h.contentstreamidentifier = :contentStreamIdentifier + WHERE h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :sourceDimensionSpacePointHash', [ - 'contentStreamIdentifier' => $event->contentStreamIdentifier->jsonSerialize(), + 'contentStreamId' => $event->contentStreamId->jsonSerialize(), 'sourceDimensionSpacePointHash' => $event->source->hash, 'newDimensionSpacePointHash' => $event->target->hash, 'newDimensionSpacePoint' => json_encode($event->target->jsonSerialize()), @@ -1180,23 +1185,23 @@ public function whenDimensionShineThroughWasAdded(DimensionShineThroughWasAdded // 2) restriction relations $this->getDatabaseConnection()->executeUpdate(' INSERT INTO ' . $this->tableNamePrefix . '_restrictionrelation ( - contentstreamidentifier, + contentstreamid, dimensionspacepointhash, - originnodeaggregateidentifier, - affectednodeaggregateidentifier + originnodeaggregateid, + affectednodeaggregateid ) SELECT - r.contentstreamidentifier, + r.contentstreamid, :targetDimensionSpacePointHash, - r.originnodeaggregateidentifier, - r.affectednodeaggregateidentifier + r.originnodeaggregateid, + r.affectednodeaggregateid FROM ' . $this->tableNamePrefix . '_restrictionrelation r - WHERE r.contentstreamidentifier = :contentStreamIdentifier + WHERE r.contentstreamid = :contentStreamId AND r.dimensionspacepointhash = :sourceDimensionSpacePointHash ', [ - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier, + 'contentStreamId' => (string)$event->contentStreamId, 'sourceDimensionSpacePointHash' => $event->source->hash, 'targetDimensionSpacePointHash' => $event->target->hash ]); diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php index b5cd8478d50..6c5f4bc45ba 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php @@ -6,7 +6,7 @@ use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\NodeFactory; use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\ProjectionContentGraph; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Factory\ProjectionFactoryDependencies; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\CatchUpHookFactoryInterface; @@ -30,9 +30,9 @@ public function __construct( } public static function graphProjectionTableNamePrefix( - ContentRepositoryIdentifier $contentRepositoryIdentifier + ContentRepositoryId $contentRepositoryId ): string { - return sprintf('cr_%s_p_graph', $contentRepositoryIdentifier); + return sprintf('cr_%s_p_graph', $contentRepositoryId); } public function build( @@ -42,7 +42,7 @@ public function build( Projections $projectionsSoFar ): ContentGraphProjection { $tableNamePrefix = self::graphProjectionTableNamePrefix( - $projectionFactoryDependencies->contentRepositoryIdentifier + $projectionFactoryDependencies->contentRepositoryId ); return new ContentGraphProjection( @@ -51,7 +51,7 @@ public function build( $projectionFactoryDependencies->eventNormalizer, $this->dbalClient, new NodeFactory( - $projectionFactoryDependencies->contentRepositoryIdentifier, + $projectionFactoryDependencies->contentRepositoryId, $projectionFactoryDependencies->nodeTypeManager, $projectionFactoryDependencies->propertyConverter ), diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphSchemaBuilder.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphSchemaBuilder.php index b772d6f8aa1..0fa11486831 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphSchemaBuilder.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphSchemaBuilder.php @@ -34,7 +34,7 @@ private function createNodeTable(Schema $schema): void $table->addColumn('relationanchorpoint', Types::STRING) ->setLength(255) ->setNotnull(true); - $table->addColumn('nodeaggregateidentifier', Types::STRING) + $table->addColumn('nodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(false); $table->addColumn('origindimensionspacepoint', Types::TEXT) @@ -52,7 +52,7 @@ private function createNodeTable(Schema $schema): void ->setNotnull(true); $table ->setPrimaryKey(['relationanchorpoint']) - ->addIndex(['nodeaggregateidentifier'], 'NODE_AGGREGATE_IDENTIFIER') + ->addIndex(['nodeaggregateid'], 'NODE_AGGREGATE_ID') ->addIndex(['nodetypename'], 'NODE_TYPE_NAME'); } @@ -64,7 +64,7 @@ private function createHierarchyRelationTable(Schema $schema): void ->setNotnull(false); $table->addColumn('position', Types::INTEGER) ->setNotnull(true); - $table->addColumn('contentstreamidentifier', Types::STRING) + $table->addColumn('contentstreamid', Types::STRING) ->setLength(255) ->setNotnull(true); $table->addColumn('dimensionspacepoint', Types::TEXT) @@ -80,9 +80,9 @@ private function createHierarchyRelationTable(Schema $schema): void ->setNotnull(true); $table ->addIndex(['childnodeanchor'], 'CHILDNODEANCHOR') - ->addIndex(['contentstreamidentifier'], 'CONTENTSTREAMIDENTIFIER') + ->addIndex(['contentstreamid'], 'CONTENTSTREAMID') ->addIndex(['parentnodeanchor'], 'PARENTNODEANCHOR') - ->addIndex(['contentstreamidentifier', 'dimensionspacepointhash'], 'SUBGRAPH_IDENTIFIER'); + ->addIndex(['contentstreamid', 'dimensionspacepointhash'], 'SUBGRAPH_ID'); } private function createReferenceRelationTable(Schema $schema): void @@ -98,7 +98,7 @@ private function createReferenceRelationTable(Schema $schema): void ->setNotnull(true); $table->addColumn('properties', Types::TEXT) ->setNotnull(false); - $table->addColumn('destinationnodeaggregateidentifier', Types::STRING) + $table->addColumn('destinationnodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(true); @@ -109,25 +109,25 @@ private function createReferenceRelationTable(Schema $schema): void private function createRestrictionRelationTable(Schema $schema): void { $table = $schema->createTable($this->tableNamePrefix . '_restrictionrelation'); - $table->addColumn('contentstreamidentifier', Types::STRING) + $table->addColumn('contentstreamid', Types::STRING) ->setLength(255) ->setNotnull(true); $table->addColumn('dimensionspacepointhash', Types::STRING) ->setLength(255) ->setNotnull(true); - $table->addColumn('originnodeaggregateidentifier', Types::STRING) + $table->addColumn('originnodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(true); - $table->addColumn('affectednodeaggregateidentifier', Types::STRING) + $table->addColumn('affectednodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(true); $table ->setPrimaryKey([ - 'contentstreamidentifier', + 'contentstreamid', 'dimensionspacepointhash', - 'originnodeaggregateidentifier', - 'affectednodeaggregateidentifier' + 'originnodeaggregateid', + 'affectednodeaggregateid' ]); } } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalProjectionIntegrityViolationDetectionRunnerFactory.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalProjectionIntegrityViolationDetectionRunnerFactory.php index f5dd9630037..8c2a36b5c0f 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalProjectionIntegrityViolationDetectionRunnerFactory.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalProjectionIntegrityViolationDetectionRunnerFactory.php @@ -8,7 +8,7 @@ use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\ProjectionIntegrityViolationDetectionRunner; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * @implements ContentRepositoryServiceFactoryInterface @@ -28,7 +28,7 @@ public function build( new ProjectionIntegrityViolationDetector( $this->dbalClient, DoctrineDbalContentGraphProjectionFactory::graphProjectionTableNamePrefix( - $serviceFactoryDependencies->contentRepositoryIdentifier + $serviceFactoryDependencies->contentRepositoryId ) ) ); diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeDisabling.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeDisabling.php index 74ccc5a9928..bb68b36dd67 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeDisabling.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeDisabling.php @@ -28,15 +28,16 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): ' -- GraphProjector::whenNodeAggregateWasDisabled insert ignore into ' . $this->getTableNamePrefix() . '_restrictionrelation -( + (contentstreamid, dimensionspacepointhash, originnodeaggregateid, affectednodeaggregateid) + -- we build a recursive tree with recursive tree as ( -- -------------------------------- - -- INITIAL query: select the root nodes of the tree; as given in $menuLevelNodeIdentifiers + -- INITIAL query: select the root nodes of the tree; as given in $menuLevelNodeIds -- -------------------------------- select n.relationanchorpoint, - n.nodeaggregateidentifier, + n.nodeaggregateid, h.dimensionspacepointhash from ' . $this->getTableNamePrefix() . '_node n @@ -44,8 +45,8 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): inner join ' . $this->getTableNamePrefix() . '_hierarchyrelation h on h.childnodeanchor = n.relationanchorpoint where - n.nodeaggregateidentifier = :entryNodeAggregateIdentifier - and h.contentstreamidentifier = :contentStreamIdentifier + n.nodeaggregateid = :entryNodeAggregateId + and h.contentstreamid = :contentStreamId and h.dimensionspacepointhash in (:dimensionSpacePointHashes) union -- -------------------------------- @@ -53,7 +54,7 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): -- -------------------------------- select c.relationanchorpoint, - c.nodeaggregateidentifier, + c.nodeaggregateid, h.dimensionspacepointhash from tree p @@ -62,21 +63,20 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): inner join ' . $this->getTableNamePrefix() . '_node c on h.childnodeanchor = c.relationanchorpoint where - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId and h.dimensionspacepointhash in (:dimensionSpacePointHashes) ) select - "' . $event->contentStreamIdentifier . '" as contentstreamidentifier, + "' . $event->contentStreamId . '" as contentstreamid, dimensionspacepointhash, - "' . $event->nodeAggregateIdentifier . '" as originnodeaggregateidentifier, - nodeaggregateidentifier as affectednodeaggregateidentifier + "' . $event->nodeAggregateId . '" as originnodeaggregateid, + nodeaggregateid as affectednodeaggregateid from tree -) ', [ - 'entryNodeAggregateIdentifier' => (string)$event->nodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier, + 'entryNodeAggregateId' => (string)$event->nodeAggregateId, + 'contentStreamId' => (string)$event->contentStreamId, 'dimensionSpacePointHashes' => $event->affectedDimensionSpacePoints->getPointHashes() ], [ diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php index 1ae96134c98..ddf9f901916 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php @@ -38,9 +38,9 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void foreach ($event->nodeMoveMappings as $moveNodeMapping) { // for each materialized node in the DB which we want to adjust, we have one MoveNodeMapping. /* @var \Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeMoveMapping $moveNodeMapping */ - $nodeToBeMoved = $this->getProjectionContentGraph()->findNodeByIdentifiers( - $event->getContentStreamIdentifier(), - $event->getNodeAggregateIdentifier(), + $nodeToBeMoved = $this->getProjectionContentGraph()->findNodeByIds( + $event->getContentStreamId(), + $event->getNodeAggregateId(), $moveNodeMapping->movedNodeOrigin ); if (is_null($nodeToBeMoved)) { @@ -52,7 +52,7 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void $ingoingHierarchyRelations = $projectionContentGraph->findIngoingHierarchyRelationsForNode( $nodeToBeMoved->relationAnchorPoint, - $event->getContentStreamIdentifier() + $event->getContentStreamId() ); $coveredDimensionSpacePoints = []; foreach ($ingoingHierarchyRelations as $ingoingHierarchyRelation) { @@ -76,8 +76,8 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void // (if the parent is not visible in this DimensionSpacePoint) $newParentNodes[$coveredDimensionSpacePoint->hash] = $this->getProjectionContentGraph() ->findNodeInAggregate( - $event->getContentStreamIdentifier(), - $newParentAssignment->nodeAggregateIdentifier, + $event->getContentStreamId(), + $newParentAssignment->nodeAggregateId, $coveredDimensionSpacePoint ); $affectedHierarchyDimensionSpacePoints[] = $coveredDimensionSpacePoint; @@ -87,8 +87,8 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void // because we will reassign the parent relations, // we have to clear the restiction relations for these. $this->removeAllRestrictionRelationsInSubtreeImposedByAncestors( - $event->getContentStreamIdentifier(), - $event->getNodeAggregateIdentifier(), + $event->getContentStreamId(), + $event->getNodeAggregateId(), new DimensionSpacePointSet( $affectedHierarchyDimensionSpacePoints ) @@ -100,9 +100,9 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void $assignments = $moveNodeMapping->newSucceedingSiblingAssignments; foreach ($assignments as $coveredDimensionSpacePointHash => $newSucceedingSiblingAssignment) { $newSucceedingSiblingNodes[$coveredDimensionSpacePointHash] - = $this->getProjectionContentGraph()->findNodeByIdentifiers( - $event->getContentStreamIdentifier(), - $newSucceedingSiblingAssignment->nodeAggregateIdentifier, + = $this->getProjectionContentGraph()->findNodeByIds( + $event->getContentStreamId(), + $newSucceedingSiblingAssignment->nodeAggregateId, $newSucceedingSiblingAssignment->originDimensionSpacePoint ); } @@ -118,7 +118,7 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void $newParentNode->relationAnchorPoint, null, $newSucceedingSibling?->relationAnchorPoint, - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $coveredDimensionSpacePoint ); @@ -132,9 +132,9 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void // re-build restriction relations $this->cascadeRestrictionRelations( - $event->getContentStreamIdentifier(), - $newParentNode->nodeAggregateIdentifier, - $event->getNodeAggregateIdentifier(), + $event->getContentStreamId(), + $newParentNode->nodeAggregateId, + $event->getNodeAggregateId(), new DimensionSpacePointSet([ $coveredDimensionSpacePoint ]) @@ -148,7 +148,7 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void null, $nodeToBeMoved->relationAnchorPoint, $newSucceedingSibling->relationAnchorPoint, - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $coveredDimensionSpacePoint ); @@ -169,7 +169,7 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void null, $nodeToBeMoved->relationAnchorPoint, null, - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $coveredDimensionSpacePoint ); $ingoingHierarchyRelation->assignNewPosition( diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeRemoval.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeRemoval.php index 628fdd21366..10c3ff66a2f 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeRemoval.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeRemoval.php @@ -35,14 +35,14 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo // lateron find tricks to improve performance $this->transactional(function () use ($event) { $this->removeOutgoingRestrictionRelationsOfNodeAggregateInDimensionSpacePoints( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->affectedCoveredDimensionSpacePoints ); $ingoingRelations = $this->getProjectionContentGraph()->findIngoingHierarchyRelationsForNodeAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->affectedCoveredDimensionSpacePoints ); @@ -64,7 +64,7 @@ protected function removeRelationRecursivelyFromDatabaseIncludingNonReferencedNo foreach ( $this->getProjectionContentGraph()->findOutgoingHierarchyRelationsForNode( $ingoingRelation->childNodeAnchor, - $ingoingRelation->contentStreamIdentifier, + $ingoingRelation->contentStreamId, new DimensionSpacePointSet([$ingoingRelation->dimensionSpacePoint]) ) as $outgoingRelation ) { @@ -84,7 +84,7 @@ protected function removeRelationRecursivelyFromDatabaseIncludingNonReferencedNo WHERE n.relationanchorpoint = :anchorPointForNode -- the following line means "left join leads to NO MATCHING hierarchyrelation" - AND h.contentstreamidentifier IS NULL + AND h.contentstreamid IS NULL ', [ 'anchorPointForNode' => (string)$ingoingRelation->childNodeAnchor, diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeVariation.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeVariation.php index 73e896fc086..23d888114e5 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeVariation.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeVariation.php @@ -12,7 +12,7 @@ use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\ProjectionContentGraph; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodeGeneralizationVariantWasCreated; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodePeerVariantWasCreated; @@ -40,8 +40,8 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria $this->transactional(function () use ($event) { // Do the actual specialization $sourceNode = $this->getProjectionContentGraph()->findNodeInAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin->toDimensionSpacePoint() ); if (is_null($sourceNode)) { @@ -56,8 +56,8 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria $uncoveredDimensionSpacePoints = $event->specializationCoverage->points; foreach ( $this->getProjectionContentGraph()->findIngoingHierarchyRelationsForNodeAggregate( - $event->contentStreamIdentifier, - $sourceNode->nodeAggregateIdentifier, + $event->contentStreamId, + $sourceNode->nodeAggregateId, $event->specializationCoverage ) as $hierarchyRelation ) { @@ -70,8 +70,8 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria } if (!empty($uncoveredDimensionSpacePoints)) { $sourceParent = $this->projectionContentGraph->findParentNode( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin, ); if (is_null($sourceParent)) { @@ -79,8 +79,8 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria } foreach ($uncoveredDimensionSpacePoints as $uncoveredDimensionSpacePoint) { $parentNode = $this->projectionContentGraph->findNodeInAggregate( - $event->contentStreamIdentifier, - $sourceParent->nodeAggregateIdentifier, + $event->contentStreamId, + $sourceParent->nodeAggregateId, $uncoveredDimensionSpacePoint ); if (is_null($parentNode)) { @@ -93,14 +93,14 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria $parentNode->relationAnchorPoint, $specializedNode->relationAnchorPoint, $sourceNode->nodeName, - $event->contentStreamIdentifier, + $event->contentStreamId, $uncoveredDimensionSpacePoint, $uncoveredDimensionSpacePoint->hash, $this->projectionContentGraph->determineHierarchyRelationPosition( $parentNode->relationAnchorPoint, $specializedNode->relationAnchorPoint, null, - $event->contentStreamIdentifier, + $event->contentStreamId, $uncoveredDimensionSpacePoint ) ); @@ -110,8 +110,8 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria foreach ( $this->getProjectionContentGraph()->findOutgoingHierarchyRelationsForNodeAggregate( - $event->contentStreamIdentifier, - $sourceNode->nodeAggregateIdentifier, + $event->contentStreamId, + $sourceNode->nodeAggregateId, $event->specializationCoverage ) as $hierarchyRelation ) { @@ -141,16 +141,16 @@ public function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVarian $this->transactional(function () use ($event) { // do the generalization $sourceNode = $this->getProjectionContentGraph()->findNodeInAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin->toDimensionSpacePoint() ); if (is_null($sourceNode)) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceNodeIsMissing(get_class($event)); } $sourceParentNode = $this->getProjectionContentGraph()->findParentNode( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin ); if (is_null($sourceParentNode)) { @@ -164,8 +164,8 @@ public function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVarian $unassignedIngoingDimensionSpacePoints = $event->generalizationCoverage; foreach ( $this->getProjectionContentGraph()->findIngoingHierarchyRelationsForNodeAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->generalizationCoverage ) as $existingIngoingHierarchyRelation ) { @@ -183,8 +183,8 @@ public function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVarian foreach ( $this->getProjectionContentGraph()->findOutgoingHierarchyRelationsForNodeAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->generalizationCoverage ) as $existingOutgoingHierarchyRelation ) { @@ -200,7 +200,7 @@ public function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVarian $projectionContentGraph = $this->getProjectionContentGraph(); $ingoingSourceHierarchyRelation = $projectionContentGraph->findIngoingHierarchyRelationsForNode( $sourceNode->relationAnchorPoint, - $event->contentStreamIdentifier, + $event->contentStreamId, new DimensionSpacePointSet([$event->sourceOrigin->toDimensionSpacePoint()]) )[$event->sourceOrigin->hash] ?? null; if (is_null($ingoingSourceHierarchyRelation)) { @@ -213,8 +213,8 @@ public function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVarian // The parent node aggregate might be varied as well, // so we need to find a parent node for each covered dimension space point $generalizationParentNode = $this->getProjectionContentGraph()->findNodeInAggregate( - $event->contentStreamIdentifier, - $sourceParentNode->nodeAggregateIdentifier, + $event->contentStreamId, + $sourceParentNode->nodeAggregateId, $unassignedDimensionSpacePoint ); if (is_null($generalizationParentNode)) { @@ -225,7 +225,7 @@ public function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVarian $this->copyHierarchyRelationToDimensionSpacePoint( $ingoingSourceHierarchyRelation, - $event->contentStreamIdentifier, + $event->contentStreamId, $unassignedDimensionSpacePoint, $generalizationParentNode->relationAnchorPoint, $generalizedNode->relationAnchorPoint @@ -249,16 +249,16 @@ public function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): $this->transactional(function () use ($event) { // Do the peer variant creation itself $sourceNode = $this->getProjectionContentGraph()->findNodeInAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin->toDimensionSpacePoint() ); if (is_null($sourceNode)) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceNodeIsMissing(get_class($event)); } $sourceParentNode = $this->getProjectionContentGraph()->findParentNode( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin ); if (is_null($sourceParentNode)) { @@ -272,8 +272,8 @@ public function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): $unassignedIngoingDimensionSpacePoints = $event->peerCoverage; foreach ( $this->getProjectionContentGraph()->findIngoingHierarchyRelationsForNodeAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->peerCoverage ) as $existingIngoingHierarchyRelation ) { @@ -291,8 +291,8 @@ public function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): foreach ( $this->getProjectionContentGraph()->findOutgoingHierarchyRelationsForNodeAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->peerCoverage ) as $existingOutgoingHierarchyRelation ) { @@ -308,8 +308,8 @@ public function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): // The parent node aggregate might be varied as well, // so we need to find a parent node for each covered dimension space point $peerParentNode = $this->getProjectionContentGraph()->findNodeInAggregate( - $event->contentStreamIdentifier, - $sourceParentNode->nodeAggregateIdentifier, + $event->contentStreamId, + $sourceParentNode->nodeAggregateId, $coveredDimensionSpacePoint ); if (is_null($peerParentNode)) { @@ -317,7 +317,7 @@ public function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): } $this->connectHierarchy( - $event->contentStreamIdentifier, + $event->contentStreamId, $peerParentNode->relationAnchorPoint, $peerNode->relationAnchorPoint, new DimensionSpacePointSet([$coveredDimensionSpacePoint]), @@ -341,14 +341,14 @@ abstract protected function copyNodeToDimensionSpacePoint( abstract protected function copyHierarchyRelationToDimensionSpacePoint( HierarchyRelation $sourceHierarchyRelation, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, ?NodeRelationAnchorPoint $newParent = null, ?NodeRelationAnchorPoint $newChild = null ): HierarchyRelation; abstract protected function connectHierarchy( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeRelationAnchorPoint $parentNodeAnchorPoint, NodeRelationAnchorPoint $childNodeAnchorPoint, DimensionSpacePointSet $dimensionSpacePointSet, diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/RestrictionRelations.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/RestrictionRelations.php index bbbb8c23b3e..6a4ec11cec6 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/RestrictionRelations.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/RestrictionRelations.php @@ -7,8 +7,8 @@ use Doctrine\DBAL\Connection; use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\ProjectionContentGraph; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * @internal @@ -20,14 +20,14 @@ abstract protected function getProjectionContentGraph(): ProjectionContentGraph; abstract protected function getTableNamePrefix(): string; /** - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $originNodeAggregateIdentifier + * @param ContentStreamId $contentStreamId + * @param NodeAggregateId $originNodeAggregateId * @param DimensionSpacePointSet $affectedDimensionSpacePoints * @throws \Doctrine\DBAL\DBALException */ private function removeOutgoingRestrictionRelationsOfNodeAggregateInDimensionSpacePoints( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $originNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $originNodeAggregateId, DimensionSpacePointSet $affectedDimensionSpacePoints ): void { $this->getDatabaseConnection()->executeUpdate( @@ -36,12 +36,12 @@ private function removeOutgoingRestrictionRelationsOfNodeAggregateInDimensionSpa DELETE r.* FROM ' . $this->getTableNamePrefix() . '_restrictionrelation r -WHERE r.contentstreamidentifier = :contentStreamIdentifier -AND r.originnodeaggregateidentifier = :originNodeAggregateIdentifier +WHERE r.contentstreamid = :contentStreamId +AND r.originnodeaggregateid = :originNodeAggregateId AND r.dimensionspacepointhash in (:dimensionSpacePointHashes)', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'originNodeAggregateIdentifier' => (string)$originNodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'originNodeAggregateId' => (string)$originNodeAggregateId, 'dimensionSpacePointHashes' => $affectedDimensionSpacePoints->getPointHashes() ], [ @@ -54,8 +54,8 @@ private function removeOutgoingRestrictionRelationsOfNodeAggregateInDimensionSpa * @throws \Doctrine\DBAL\DBALException */ private function removeAllRestrictionRelationsUnderneathNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId ): void { $this->getDatabaseConnection()->executeUpdate( ' @@ -72,7 +72,7 @@ private function removeAllRestrictionRelationsUnderneathNodeAggregate( -- -------------------------------- select n.relationanchorpoint, - n.nodeaggregateidentifier, + n.nodeaggregateid, h.dimensionspacepointhash from ' . $this->getTableNamePrefix() . '_node n @@ -81,15 +81,15 @@ private function removeAllRestrictionRelationsUnderneathNodeAggregate( inner join ' . $this->getTableNamePrefix() . '_hierarchyrelation h on h.childnodeanchor = n.relationanchorpoint where - n.nodeaggregateidentifier = :entryNodeAggregateIdentifier - and h.contentstreamidentifier = :contentStreamIdentifier + n.nodeaggregateid = :entryNodeAggregateId + and h.contentstreamid = :contentStreamId union -- -------------------------------- -- RECURSIVE query: do one "child" query step -- -------------------------------- select c.relationanchorpoint, - c.nodeaggregateidentifier, + c.nodeaggregateid, h.dimensionspacepointhash from tree p @@ -98,21 +98,21 @@ private function removeAllRestrictionRelationsUnderneathNodeAggregate( inner join ' . $this->getTableNamePrefix() . '_node c on h.childnodeanchor = c.relationanchorpoint where - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId ) select * from tree ) as tree - -- the "tree" CTE now contains a list of tuples (nodeAggregateIdentifier,dimensionSpacePointHash) - -- which are *descendants* of the starting NodeAggregateIdentifier in ALL DimensionSpacePointHashes + -- the "tree" CTE now contains a list of tuples (nodeAggregateId,dimensionSpacePointHash) + -- which are *descendants* of the starting NodeAggregateId in ALL DimensionSpacePointHashes where - r.contentstreamidentifier = :contentStreamIdentifier + r.contentstreamid = :contentStreamId and r.dimensionspacepointhash = tree.dimensionspacepointhash - and r.affectednodeaggregateidentifier = tree.nodeaggregateidentifier + and r.affectednodeaggregateid = tree.nodeaggregateid ', [ - 'entryNodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'entryNodeAggregateId' => (string)$nodeAggregateId, + 'contentStreamId' => (string)$contentStreamId, ] ); } @@ -121,14 +121,14 @@ private function removeAllRestrictionRelationsUnderneathNodeAggregate( * @throws \Doctrine\DBAL\DBALException */ private function removeAllRestrictionRelationsInSubtreeImposedByAncestors( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $entryNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $entryNodeAggregateId, DimensionSpacePointSet $affectedDimensionSpacePoints ): void { $projectionContentGraph = $this->getProjectionContentGraph(); - $descendantNodeAggregateIdentifiers = $projectionContentGraph->findDescendantNodeAggregateIdentifiers( - $contentStreamIdentifier, - $entryNodeAggregateIdentifier, + $descendantNodeAggregateIds = $projectionContentGraph->findDescendantNodeAggregateIds( + $contentStreamId, + $entryNodeAggregateId, $affectedDimensionSpacePoints ); @@ -138,17 +138,17 @@ private function removeAllRestrictionRelationsInSubtreeImposedByAncestors( DELETE r.* FROM ' . $this->getTableNamePrefix() . '_restrictionrelation r - WHERE r.contentstreamidentifier = :contentStreamIdentifier - AND r.originnodeaggregateidentifier NOT IN (:descendantNodeAggregateIdentifiers) - AND r.affectednodeaggregateidentifier IN (:descendantNodeAggregateIdentifiers) + WHERE r.contentstreamid = :contentStreamId + AND r.originnodeaggregateid NOT IN (:descendantNodeAggregateIds) + AND r.affectednodeaggregateid IN (:descendantNodeAggregateIds) AND r.dimensionspacepointhash IN (:affectedDimensionSpacePointHashes)', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'descendantNodeAggregateIdentifiers' => array_keys($descendantNodeAggregateIdentifiers), + 'contentStreamId' => (string)$contentStreamId, + 'descendantNodeAggregateIds' => array_keys($descendantNodeAggregateIds), 'affectedDimensionSpacePointHashes' => $affectedDimensionSpacePoints->getPointHashes() ], [ - 'descendantNodeAggregateIdentifiers' => Connection::PARAM_STR_ARRAY, + 'descendantNodeAggregateIds' => Connection::PARAM_STR_ARRAY, 'affectedDimensionSpacePointHashes' => Connection::PARAM_STR_ARRAY ] ); diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/HierarchyRelation.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/HierarchyRelation.php index 83fad57399a..40d86141b65 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/HierarchyRelation.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/HierarchyRelation.php @@ -15,7 +15,7 @@ namespace Neos\ContentGraph\DoctrineDbalAdapter\Domain\Projection; use Doctrine\DBAL\Connection; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; @@ -30,7 +30,7 @@ public function __construct( public NodeRelationAnchorPoint $parentNodeAnchor, public NodeRelationAnchorPoint $childNodeAnchor, public ?NodeName $name, - public ContentStreamIdentifier $contentStreamIdentifier, + public ContentStreamId $contentStreamId, public DimensionSpacePoint $dimensionSpacePoint, public string $dimensionSpacePointHash, public int $position @@ -46,7 +46,7 @@ public function addToDatabase(Connection $databaseConnection, string $tableNameP 'parentnodeanchor' => $this->parentNodeAnchor, 'childnodeanchor' => $this->childNodeAnchor, 'name' => $this->name, - 'contentstreamidentifier' => $this->contentStreamIdentifier, + 'contentstreamid' => $this->contentStreamId, 'dimensionspacepoint' => json_encode($this->dimensionSpacePoint), 'dimensionspacepointhash' => $this->dimensionSpacePointHash, 'position' => $this->position @@ -58,7 +58,7 @@ public function addToDatabase(Connection $databaseConnection, string $tableNameP */ public function removeFromDatabase(Connection $databaseConnection, string $tableNamePrefix): void { - $databaseConnection->delete($tableNamePrefix . '_hierarchyrelation', $this->getDatabaseIdentifier()); + $databaseConnection->delete($tableNamePrefix . '_hierarchyrelation', $this->getDatabaseId()); } /** @@ -75,7 +75,7 @@ public function assignNewChildNode( [ 'childnodeanchor' => $childAnchorPoint ], - $this->getDatabaseIdentifier() + $this->getDatabaseId() ); } @@ -97,7 +97,7 @@ public function assignNewParentNode( $databaseConnection->update( $tableNamePrefix . '_hierarchyrelation', $data, - $this->getDatabaseIdentifier() + $this->getDatabaseId() ); } @@ -108,19 +108,19 @@ public function assignNewPosition(int $position, Connection $databaseConnection, [ 'position' => $position ], - $this->getDatabaseIdentifier() + $this->getDatabaseId() ); } /** * @return array */ - public function getDatabaseIdentifier(): array + public function getDatabaseId(): array { return [ 'parentnodeanchor' => $this->parentNodeAnchor, 'childnodeanchor' => $this->childNodeAnchor, - 'contentstreamidentifier' => $this->contentStreamIdentifier, + 'contentstreamid' => $this->contentStreamId, 'dimensionspacepointhash' => $this->dimensionSpacePointHash ]; } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/NodeRecord.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/NodeRecord.php index a5f93491003..58ddd8dc910 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/NodeRecord.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/NodeRecord.php @@ -17,7 +17,7 @@ use Doctrine\DBAL\Connection; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -30,7 +30,7 @@ final class NodeRecord { public function __construct( public NodeRelationAnchorPoint $relationAnchorPoint, - public NodeAggregateIdentifier $nodeAggregateIdentifier, + public NodeAggregateId $nodeAggregateId, /** @var array */ public array $originDimensionSpacePoint, public string $originDimensionSpacePointHash, @@ -50,7 +50,7 @@ public function addToDatabase(Connection $databaseConnection, string $tableNameP { $databaseConnection->insert($tableNamePrefix . '_node', [ 'relationanchorpoint' => (string)$this->relationAnchorPoint, - 'nodeaggregateidentifier' => (string)$this->nodeAggregateIdentifier, + 'nodeaggregateid' => (string)$this->nodeAggregateId, 'origindimensionspacepoint' => json_encode($this->originDimensionSpacePoint), 'origindimensionspacepointhash' => $this->originDimensionSpacePointHash, 'properties' => json_encode($this->properties), @@ -68,7 +68,7 @@ public function updateToDatabase(Connection $databaseConnection, string $tableNa $databaseConnection->update( $tableNamePrefix . '_node', [ - 'nodeaggregateidentifier' => (string)$this->nodeAggregateIdentifier, + 'nodeaggregateid' => (string)$this->nodeAggregateId, 'origindimensionspacepoint' => json_encode($this->originDimensionSpacePoint), 'origindimensionspacepointhash' => $this->originDimensionSpacePointHash, 'properties' => json_encode($this->properties), @@ -101,7 +101,7 @@ public static function fromDatabaseRow(array $databaseRow): self { return new self( NodeRelationAnchorPoint::fromString($databaseRow['relationanchorpoint']), - NodeAggregateIdentifier::fromString($databaseRow['nodeaggregateidentifier']), + NodeAggregateId::fromString($databaseRow['nodeaggregateid']), json_decode($databaseRow['origindimensionspacepoint'], true), $databaseRow['origindimensionspacepointhash'], SerializedPropertyValues::fromArray(json_decode($databaseRow['properties'], true)), diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/ProjectionIntegrityViolationDetector.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/ProjectionIntegrityViolationDetector.php index f0c80591e1f..900b7a66ad3 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/ProjectionIntegrityViolationDetector.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/ProjectionIntegrityViolationDetector.php @@ -17,8 +17,8 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Error\Messages\Error; use Neos\Error\Messages\Result; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; @@ -84,8 +84,8 @@ public function hierarchyIntegrityIsProvided(): Result LEFT JOIN ' . $this->tableNamePrefix . '_node p ON h.parentnodeanchor = p.relationanchorpoint LEFT JOIN ' . $this->tableNamePrefix . '_node c ON h.childnodeanchor = c.relationanchorpoint WHERE h.parentnodeanchor != :rootNodeAnchor - GROUP BY p.nodeaggregateidentifier, c.nodeaggregateidentifier, - h.dimensionspacepointhash, h.contentstreamidentifier + GROUP BY p.nodeaggregateid, c.nodeaggregateid, + h.dimensionspacepointhash, h.contentstreamid HAVING uniquenessCounter > 1 ', [ @@ -114,13 +114,13 @@ public function siblingsAreDistinctlySorted(): Result $ambiguouslySortedHierarchyRelationRecords = $this->client->getConnection()->executeQuery( 'SELECT *, COUNT(position) FROM ' . $this->tableNamePrefix . '_hierarchyrelation - GROUP BY position, parentnodeanchor, contentstreamidentifier, dimensionspacepointhash + GROUP BY position, parentnodeanchor, contentstreamid, dimensionspacepointhash HAVING COUNT(position) > 1' ); foreach ($ambiguouslySortedHierarchyRelationRecords as $hierarchyRelationRecord) { $ambiguouslySortedNodeRecords = $this->client->getConnection()->executeQuery( - 'SELECT nodeaggregateidentifier + 'SELECT nodeaggregateid FROM ' . $this->tableNamePrefix . '_node WHERE relationanchorpoint = :relationAnchorPoint', [ @@ -130,9 +130,9 @@ public function siblingsAreDistinctlySorted(): Result $result->addError(new Error( 'Siblings ' . implode(', ', array_map(function (array $record) { - return $record['nodeaggregateidentifier']; + return $record['nodeaggregateid']; }, $ambiguouslySortedNodeRecords)) - . ' are ambiguously sorted in content stream ' . $hierarchyRelationRecord['contentstreamidentifier'] + . ' are ambiguously sorted in content stream ' . $hierarchyRelationRecord['contentstreamid'] . ' and dimension space point ' . $hierarchyRelationRecord['dimensionspacepoint'], self::ERROR_CODE_SIBLINGS_ARE_AMBIGUOUSLY_SORTED )); @@ -148,13 +148,13 @@ public function tetheredNodesAreNamed(): Result { $result = new Result(); $unnamedTetheredNodeRecords = $this->client->getConnection()->executeQuery( - 'SELECT n.nodeaggregateidentifier, h.contentstreamidentifier + 'SELECT n.nodeaggregateid, h.contentstreamid FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint WHERE n.classification = :tethered AND h.name IS NULL - GROUP BY n.nodeaggregateidentifier, h.contentstreamidentifier', + GROUP BY n.nodeaggregateid, h.contentstreamid', [ 'tethered' => NodeAggregateClassification::CLASSIFICATION_TETHERED->value ] @@ -162,8 +162,8 @@ public function tetheredNodesAreNamed(): Result foreach ($unnamedTetheredNodeRecords as $unnamedTetheredNodeRecord) { $result->addError(new Error( - 'Node aggregate ' . $unnamedTetheredNodeRecord['nodeaggregateidentifier'] - . ' is unnamed in content stream ' . $unnamedTetheredNodeRecord['contentstreamidentifier'] . '.', + 'Node aggregate ' . $unnamedTetheredNodeRecord['nodeaggregateid'] + . ' is unnamed in content stream ' . $unnamedTetheredNodeRecord['contentstreamid'] . '.', self::ERROR_CODE_TETHERED_NODE_IS_UNNAMED )); } @@ -179,27 +179,27 @@ public function restrictionsArePropagatedRecursively(): Result { $result = new Result(); $nodeRecordsWithMissingRestrictions = $this->client->getConnection()->executeQuery( - 'SELECT c.nodeaggregateidentifier, h.contentstreamidentifier, h.dimensionspacepoint + 'SELECT c.nodeaggregateid, h.contentstreamid, h.dimensionspacepoint FROM ' . $this->tableNamePrefix . '_hierarchyrelation h INNER JOIN ' . $this->tableNamePrefix . '_node p ON p.relationanchorpoint = h.parentnodeanchor INNER JOIN ' . $this->tableNamePrefix . '_restrictionrelation pr - ON pr.affectednodeaggregateidentifier = p.nodeaggregateidentifier - AND pr.contentstreamidentifier = h.contentstreamidentifier + ON pr.affectednodeaggregateid = p.nodeaggregateid + AND pr.contentstreamid = h.contentstreamid AND pr.dimensionspacepointhash = h.dimensionspacepointhash INNER JOIN ' . $this->tableNamePrefix . '_node c ON c.relationanchorpoint = h.childnodeanchor LEFT JOIN ' . $this->tableNamePrefix . '_restrictionrelation cr - ON cr.affectednodeaggregateidentifier = c.nodeaggregateidentifier - AND cr.contentstreamidentifier = h.contentstreamidentifier + ON cr.affectednodeaggregateid = c.nodeaggregateid + AND cr.contentstreamid = h.contentstreamid AND cr.dimensionspacepointhash = h.dimensionspacepointhash - WHERE cr.affectednodeaggregateidentifier IS NULL' + WHERE cr.affectednodeaggregateid IS NULL' )->fetchAllAssociative(); foreach ($nodeRecordsWithMissingRestrictions as $nodeRecord) { $result->addError(new Error( - 'Node aggregate ' . $nodeRecord['nodeaggregateidentifier'] - . ' misses a restriction relation in content stream ' . $nodeRecord['contentstreamidentifier'] + 'Node aggregate ' . $nodeRecord['nodeaggregateid'] + . ' misses a restriction relation in content stream ' . $nodeRecord['contentstreamid'] . ' and dimension space point ' . $nodeRecord['dimensionspacepoint'], self::ERROR_CODE_NODE_HAS_MISSING_RESTRICTION )); @@ -222,25 +222,25 @@ public function restrictionIntegrityIsProvided(): Result ' . $this->tableNamePrefix . '_node p INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ph ON p.relationanchorpoint = ph.childnodeanchor - ) ON p.nodeaggregateidentifier = r.originnodeaggregateidentifier - AND ph.contentstreamidentifier = r.contentstreamidentifier + ) ON p.nodeaggregateid = r.originnodeaggregateid + AND ph.contentstreamid = r.contentstreamid AND ph.dimensionspacepointhash = r.dimensionspacepointhash LEFT JOIN ( ' . $this->tableNamePrefix . '_node c INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ch ON c.relationanchorpoint = ch.childnodeanchor - ) ON c.nodeaggregateidentifier = r.affectednodeaggregateidentifier - AND ch.contentstreamidentifier = r.contentstreamidentifier + ) ON c.nodeaggregateid = r.affectednodeaggregateid + AND ch.contentstreamid = r.contentstreamid AND ch.dimensionspacepointhash = r.dimensionspacepointhash - WHERE p.nodeaggregateidentifier IS NULL - OR c.nodeaggregateidentifier IS NULL' + WHERE p.nodeaggregateid IS NULL + OR c.nodeaggregateid IS NULL' )->fetchAllAssociative(); foreach ($restrictionRelationRecordsWithoutOriginOrAffectedNode as $relationRecord) { $result->addError(new Error( - 'Restriction relation ' . $relationRecord['originnodeaggregateidentifier'] - . ' -> ' . $relationRecord['affectednodeaggregateidentifier'] - . ' does not connect two nodes in content stream ' . $relationRecord['contentstreamidentifier'] + 'Restriction relation ' . $relationRecord['originnodeaggregateid'] + . ' -> ' . $relationRecord['affectednodeaggregateid'] + . ' does not connect two nodes in content stream ' . $relationRecord['contentstreamid'] . ' and dimension space point ' . $relationRecord['dimensionspacepointhash'], self::ERROR_CODE_RESTRICTION_INTEGRITY_IS_COMPROMISED )); @@ -272,9 +272,9 @@ public function referenceIntegrityIsProvided(): Result } $referenceRelationRecordsWithInvalidTarget = $this->client->getConnection()->executeQuery( - 'SELECT sh.contentstreamidentifier AS contentstreamIdentifier, - s.nodeaggregateidentifier AS sourceNodeAggregateIdentifier, - r.destinationnodeaggregateidentifier AS destinationNodeAggregateIdentifier + 'SELECT sh.contentstreamid AS contentstreamId, + s.nodeaggregateid AS sourceNodeAggregateId, + r.destinationnodeaggregateid AS destinationNodeAggregateId FROM ' . $this->tableNamePrefix . '_referencerelation r INNER JOIN ' . $this->tableNamePrefix . '_node s ON r.nodeanchorpoint = s.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation sh @@ -283,18 +283,18 @@ public function referenceIntegrityIsProvided(): Result ' . $this->tableNamePrefix . '_node d INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation dh ON d.relationanchorpoint = dh.childnodeanchor - ) ON r.destinationnodeaggregateidentifier = d.nodeaggregateidentifier - AND sh.contentstreamidentifier = dh.contentstreamidentifier + ) ON r.destinationnodeaggregateid = d.nodeaggregateid + AND sh.contentstreamid = dh.contentstreamid AND sh.dimensionspacepointhash = dh.dimensionspacepointhash - WHERE d.nodeaggregateidentifier IS NULL - GROUP BY s.nodeaggregateidentifier' + WHERE d.nodeaggregateid IS NULL + GROUP BY s.nodeaggregateid' )->fetchAllAssociative(); foreach ($referenceRelationRecordsWithInvalidTarget as $record) { $result->addError(new Error( - 'Destination node aggregate ' . $record['destinationNodeAggregateIdentifier'] - . ' does not cover any dimension space points the source ' . $record['sourceNodeAggregateIdentifier'] - . ' does in content stream ' . $record['contentstreamIdentifier'], + 'Destination node aggregate ' . $record['destinationNodeAggregateId'] + . ' does not cover any dimension space points the source ' . $record['sourceNodeAggregateId'] + . ' does in content stream ' . $record['contentstreamId'], self::ERROR_CODE_REFERENCE_INTEGRITY_IS_COMPROMISED )); } @@ -319,9 +319,9 @@ public function allNodesAreConnectedToARootNodePerSubgraph(): Result { $result = new Result(); - foreach ($this->findProjectedContentStreamIdentifiers() as $contentStreamIdentifier) { + foreach ($this->findProjectedContentStreamIds() as $contentStreamId) { foreach ($this->findProjectedDimensionSpacePoints() as $dimensionSpacePoint) { - $nodeAggregateIdentifiersInCycles = $this->client->getConnection()->executeQuery( + $nodeAggregateIdsInCycles = $this->client->getConnection()->executeQuery( 'WITH RECURSIVE subgraph AS ( SELECT h.childnodeanchor @@ -329,7 +329,7 @@ public function allNodesAreConnectedToARootNodePerSubgraph(): Result ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.parentnodeanchor = :rootAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash UNION -- -------------------------------- @@ -342,33 +342,33 @@ public function allNodesAreConnectedToARootNodePerSubgraph(): Result INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h on h.parentnodeanchor = p.childnodeanchor WHERE - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash ) -SELECT nodeaggregateidentifier FROM ' . $this->tableNamePrefix . '_node n +SELECT nodeaggregateid FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint WHERE - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash AND relationanchorpoint NOT IN (SELECT * FROM subgraph)', [ 'rootAnchorPoint' => NodeRelationAnchorPoint::forRootEdge(), - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAllAssociative(); - if (!empty($nodeAggregateIdentifiersInCycles)) { - $nodeAggregateIdentifiersInCycles = array_map(function (array $record) { - return $record['nodeaggregateidentifier']; - }, $nodeAggregateIdentifiersInCycles); + if (!empty($nodeAggregateIdsInCycles)) { + $nodeAggregateIdsInCycles = array_map(function (array $record) { + return $record['nodeaggregateid']; + }, $nodeAggregateIdsInCycles); $result->addError(new Error( - 'Subgraph defined by content strean ' . $contentStreamIdentifier + 'Subgraph defined by content strean ' . $contentStreamId . ' and dimension space point ' . (string) $dimensionSpacePoint . ' is cyclic for node aggregates ' - . implode(',', $nodeAggregateIdentifiersInCycles), + . implode(',', $nodeAggregateIdsInCycles), self::ERROR_CODE_NODE_IS_DISCONNECTED_FROM_THE_ROOT )); } @@ -392,30 +392,30 @@ public function nonRootNodesHaveParents(): Result /** * @inheritDoc */ - public function nodeAggregateIdentifiersAreUniquePerSubgraph(): Result + public function nodeAggregateIdsAreUniquePerSubgraph(): Result { $result = new Result(); - foreach ($this->findProjectedContentStreamIdentifiers() as $contentStreamIdentifier) { + foreach ($this->findProjectedContentStreamIds() as $contentStreamId) { foreach ($this->findProjectedDimensionSpacePoints() as $dimensionSpacePoint) { $ambiguousNodeAggregateRecords = $this->client->getConnection()->executeQuery( - 'SELECT n.nodeaggregateidentifier, COUNT(n.relationanchorpoint) + 'SELECT n.nodeaggregateid, COUNT(n.relationanchorpoint) FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier + WHERE h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash - GROUP BY n.nodeaggregateidentifier + GROUP BY n.nodeaggregateid HAVING COUNT(DISTINCT(n.relationanchorpoint)) > 1', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAllAssociative(); foreach ($ambiguousNodeAggregateRecords as $ambiguousRecord) { $result->addError(new Error( - 'Node aggregate ' . $ambiguousRecord['nodeaggregateidentifier'] - . ' is ambiguous in content stream ' . $contentStreamIdentifier + 'Node aggregate ' . $ambiguousRecord['nodeaggregateid'] + . ' is ambiguous in content stream ' . $contentStreamId . ' and dimension space point ' . (string) $dimensionSpacePoint, self::ERROR_CODE_AMBIGUOUS_NODE_AGGREGATE_IN_SUBGRAPH )); @@ -432,27 +432,27 @@ public function nodeAggregateIdentifiersAreUniquePerSubgraph(): Result public function allNodesHaveAtMostOneParentPerSubgraph(): Result { $result = new Result(); - foreach ($this->findProjectedContentStreamIdentifiers() as $contentStreamIdentifier) { + foreach ($this->findProjectedContentStreamIds() as $contentStreamId) { foreach ($this->findProjectedDimensionSpacePoints() as $dimensionSpacePoint) { $nodeRecordsWithMultipleParents = $this->client->getConnection()->executeQuery( - 'SELECT c.nodeaggregateidentifier + 'SELECT c.nodeaggregateid FROM ' . $this->tableNamePrefix . '_node c INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = c.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier + WHERE h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash GROUP BY c.relationanchorpoint HAVING COUNT(DISTINCT(h.parentnodeanchor)) > 1', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAllAssociative(); foreach ($nodeRecordsWithMultipleParents as $record) { $result->addError(new Error( - 'Node aggregate ' . $record['nodeaggregateidentifier'] - . ' has multiple parents in content stream ' . $contentStreamIdentifier + 'Node aggregate ' . $record['nodeaggregateid'] + . ' has multiple parents in content stream ' . $contentStreamId . ' and dimension space point ' . (string) $dimensionSpacePoint, self::ERROR_CODE_NODE_HAS_MULTIPLE_PARENTS )); @@ -469,28 +469,28 @@ public function allNodesHaveAtMostOneParentPerSubgraph(): Result public function nodeAggregatesAreConsistentlyTypedPerContentStream(): Result { $result = new Result(); - foreach ($this->findProjectedContentStreamIdentifiers() as $contentStreamIdentifier) { + foreach ($this->findProjectedContentStreamIds() as $contentStreamId) { foreach ( - $this->findProjectedNodeAggregateIdentifiersInContentStream( - $contentStreamIdentifier - ) as $nodeAggregateIdentifier + $this->findProjectedNodeAggregateIdsInContentStream( + $contentStreamId + ) as $nodeAggregateId ) { $nodeAggregateRecords = $this->client->getConnection()->executeQuery( 'SELECT DISTINCT n.nodetypename FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier - AND n.nodeaggregateidentifier = :nodeAggregateIdentifier', + WHERE h.contentstreamid = :contentStreamId + AND n.nodeaggregateid = :nodeAggregateId', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier + 'contentStreamId' => (string)$contentStreamId, + 'nodeAggregateId' => (string)$nodeAggregateId ] )->fetchAllAssociative(); if (count($nodeAggregateRecords) > 1) { $result->addError(new Error( - 'Node aggregate ' . $nodeAggregateIdentifier - . ' in content stream ' . $contentStreamIdentifier + 'Node aggregate ' . $nodeAggregateId + . ' in content stream ' . $contentStreamId . ' is of ambiguous type ("' . implode('","', array_map( function (array $record) { return $record['nodetypename']; @@ -512,28 +512,28 @@ function (array $record) { public function nodeAggregatesAreConsistentlyClassifiedPerContentStream(): Result { $result = new Result(); - foreach ($this->findProjectedContentStreamIdentifiers() as $contentStreamIdentifier) { + foreach ($this->findProjectedContentStreamIds() as $contentStreamId) { foreach ( - $this->findProjectedNodeAggregateIdentifiersInContentStream( - $contentStreamIdentifier - ) as $nodeAggregateIdentifier + $this->findProjectedNodeAggregateIdsInContentStream( + $contentStreamId + ) as $nodeAggregateId ) { $nodeAggregateRecords = $this->client->getConnection()->executeQuery( 'SELECT DISTINCT n.classification FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier - AND n.nodeaggregateidentifier = :nodeAggregateIdentifier', + WHERE h.contentstreamid = :contentStreamId + AND n.nodeaggregateid = :nodeAggregateId', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier + 'contentStreamId' => (string)$contentStreamId, + 'nodeAggregateId' => (string)$nodeAggregateId ] )->fetchAllAssociative(); if (count($nodeAggregateRecords) > 1) { $result->addError(new Error( - 'Node aggregate ' . $nodeAggregateIdentifier - . ' in content stream ' . $contentStreamIdentifier + 'Node aggregate ' . $nodeAggregateId + . ' in content stream ' . $contentStreamId . ' is ambiguously classified ("' . implode('","', array_map( function (array $record) { return $record['classification']; @@ -555,27 +555,27 @@ function (array $record) { public function childNodeCoverageIsASubsetOfParentNodeCoverage(): Result { $result = new Result(); - foreach ($this->findProjectedContentStreamIdentifiers() as $contentStreamIdentifier) { + foreach ($this->findProjectedContentStreamIds() as $contentStreamId) { $excessivelyCoveringNodeRecords = $this->client->getConnection()->executeQuery( - 'SELECT n.nodeaggregateidentifier, c.dimensionspacepoint + 'SELECT n.nodeaggregateid, c.dimensionspacepoint FROM ' . $this->tableNamePrefix . '_hierarchyrelation c INNER JOIN ' . $this->tableNamePrefix . '_node n ON c.childnodeanchor = n.relationanchorpoint LEFT JOIN ' . $this->tableNamePrefix . '_hierarchyrelation p ON c.parentnodeanchor = p.childnodeanchor - WHERE c.contentstreamidentifier = :contentStreamIdentifier - AND p.contentstreamidentifier = :contentStreamIdentifier + WHERE c.contentstreamid = :contentStreamId + AND p.contentstreamid = :contentStreamId AND c.dimensionspacepointhash = p.dimensionspacepointhash AND p.childnodeanchor IS NULL', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier + 'contentStreamId' => (string)$contentStreamId ] )->fetchAllAssociative(); foreach ($excessivelyCoveringNodeRecords as $excessivelyCoveringNodeRecord) { $result->addError(new Error( - 'Node aggregate ' . $excessivelyCoveringNodeRecord['nodeaggregateidentifier'] - . ' in content stream ' . $contentStreamIdentifier + 'Node aggregate ' . $excessivelyCoveringNodeRecord['nodeaggregateid'] + . ' in content stream ' . $contentStreamId . ' covers dimension space point ' . $excessivelyCoveringNodeRecord['dimensionspacepoint'] . ' but its parent does not.', self::ERROR_CODE_CHILD_NODE_COVERAGE_IS_NO_SUBSET_OF_PARENT_NODE_COVERAGE @@ -592,34 +592,34 @@ public function childNodeCoverageIsASubsetOfParentNodeCoverage(): Result public function allNodesCoverTheirOrigin(): Result { $result = new Result(); - foreach ($this->findProjectedContentStreamIdentifiers() as $contentStreamIdentifier) { + foreach ($this->findProjectedContentStreamIds() as $contentStreamId) { $nodeRecordsWithMissingOriginCoverage = $this->client->getConnection()->executeQuery( - 'SELECT nodeaggregateidentifier, origindimensionspacepoint + 'SELECT nodeaggregateid, origindimensionspacepoint FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint WHERE - h.contentstreamidentifier = :contentStreamIdentifier - AND nodeaggregateidentifier NOT IN ( + h.contentstreamid = :contentStreamId + AND nodeaggregateid NOT IN ( -- this query finds all nodes whose origin *IS COVERED* by an incoming hierarchy relation. - SELECT n.nodeaggregateidentifier + SELECT n.nodeaggregateid FROM ' . $this->tableNamePrefix . '_node n LEFT JOIN ' . $this->tableNamePrefix . '_hierarchyrelation p ON p.childnodeanchor = n.relationanchorpoint AND p.dimensionspacepointhash = n.origindimensionspacepointhash - WHERE p.contentstreamidentifier = :contentStreamIdentifier + WHERE p.contentstreamid = :contentStreamId ) AND classification != :rootClassification', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'rootClassification' => NodeAggregateClassification::CLASSIFICATION_ROOT->value ] )->fetchAllAssociative(); foreach ($nodeRecordsWithMissingOriginCoverage as $nodeRecord) { $result->addError(new Error( - 'Node aggregate ' . $nodeRecord['nodeaggregateidentifier'] - . ' in content stream ' . $contentStreamIdentifier + 'Node aggregate ' . $nodeRecord['nodeaggregateid'] + . ' in content stream ' . $contentStreamId . ' does not cover its origin dimension space point ' . $nodeRecord['origindimensionspacepoint'] . '.', self::ERROR_CODE_NODE_DOES_NOT_COVER_ITS_ORIGIN @@ -631,20 +631,20 @@ public function allNodesCoverTheirOrigin(): Result } /** - * Returns all content stream identifiers + * Returns all content stream ids * - * @return iterable + * @return iterable */ - protected function findProjectedContentStreamIdentifiers(): iterable + protected function findProjectedContentStreamIds(): iterable { $connection = $this->client->getConnection(); $rows = $connection->executeQuery( - 'SELECT DISTINCT contentstreamidentifier FROM ' . $this->tableNamePrefix . '_hierarchyrelation' + 'SELECT DISTINCT contentstreamid FROM ' . $this->tableNamePrefix . '_hierarchyrelation' )->fetchAllAssociative(); return array_map(function (array $row) { - return ContentStreamIdentifier::fromString($row['contentstreamidentifier']); + return ContentStreamId::fromString($row['contentstreamid']); }, $rows); } @@ -667,18 +667,18 @@ protected function findProjectedDimensionSpacePoints(): DimensionSpacePointSet } /** - * @return array + * @return array * @throws \Doctrine\DBAL\Exception | \Doctrine\DBAL\Driver\Exception */ - protected function findProjectedNodeAggregateIdentifiersInContentStream( - ContentStreamIdentifier $contentStreamIdentifier + protected function findProjectedNodeAggregateIdsInContentStream( + ContentStreamId $contentStreamId ): array { $records = $this->client->getConnection()->executeQuery( - 'SELECT DISTINCT nodeaggregateidentifier FROM ' . $this->tableNamePrefix . '_node' + 'SELECT DISTINCT nodeaggregateid FROM ' . $this->tableNamePrefix . '_node' )->fetchAllAssociative(); return array_map(function (array $record) { - return NodeAggregateIdentifier::fromString($record['nodeaggregateidentifier']); + return NodeAggregateId::fromString($record['nodeaggregateid']); }, $records); } } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php index c05513f0c6a..177f7d15354 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php @@ -30,9 +30,9 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; /** @@ -58,14 +58,14 @@ public function __construct( } final public function getSubgraph( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, VisibilityConstraints $visibilityConstraints ): ContentSubgraphInterface { - $index = $contentStreamIdentifier . '-' . $dimensionSpacePoint->hash . '-' . $visibilityConstraints->getHash(); + $index = $contentStreamId . '-' . $dimensionSpacePoint->hash . '-' . $visibilityConstraints->getHash(); if (!isset($this->subgraphs[$index])) { $this->subgraphs[$index] = new ContentSubgraph( - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint, $visibilityConstraints, $this->client, @@ -82,26 +82,26 @@ final public function getSubgraph( * @throws DBALException * @throws NodeTypeNotFoundException */ - public function findNodeByIdentifiers( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + public function findNodeById( + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint ): ?Node { $connection = $this->client->getConnection(); - // HINT: we check the ContentStreamIdentifier on the EDGE; + // HINT: we check the ContentStreamId on the EDGE; // as this is where we actually find out whether the node exists in the content stream $nodeRow = $connection->executeQuery( - 'SELECT n.*, h.contentstreamidentifier, h.name FROM ' . $this->tableNamePrefix . '_node n + 'SELECT n.*, h.contentstreamid, h.name FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier + WHERE n.nodeaggregateid = :nodeAggregateId AND n.origindimensionspacepointhash = :originDimensionSpacePointHash - AND h.contentstreamidentifier = :contentStreamIdentifier', + AND h.contentstreamid = :contentStreamId', [ - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, + 'nodeAggregateId' => (string)$nodeAggregateId, 'originDimensionSpacePointHash' => $originDimensionSpacePoint->hash, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier + 'contentStreamId' => (string)$contentStreamId ] )->fetchAssociative(); @@ -116,22 +116,22 @@ public function findNodeByIdentifiers( * @throws \Exception */ public function findRootNodeAggregateByType( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeTypeName $nodeTypeName ): NodeAggregate { $connection = $this->client->getConnection(); - $query = 'SELECT n.*, h.contentstreamidentifier, h.name, h.dimensionspacepoint AS covereddimensionspacepoint + $query = 'SELECT n.*, h.contentstreamid, h.name, h.dimensionspacepoint AS covereddimensionspacepoint FROM ' . $this->tableNamePrefix . '_node n JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier - AND h.parentnodeanchor = :rootEdgeParentAnchorIdentifier + WHERE h.contentstreamid = :contentStreamId + AND h.parentnodeanchor = :rootEdgeParentAnchorId AND n.nodetypename = :nodeTypeName'; $parameters = [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'rootEdgeParentAnchorIdentifier' => (string)NodeRelationAnchorPoint::forRootEdge(), + 'contentStreamId' => (string)$contentStreamId, + 'rootEdgeParentAnchorId' => (string)NodeRelationAnchorPoint::forRootEdge(), 'nodeTypeName' => (string)$nodeTypeName, ]; @@ -151,20 +151,20 @@ public function findRootNodeAggregateByType( } public function findNodeAggregatesByType( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeTypeName $nodeTypeName ): iterable { $connection = $this->client->getConnection(); - $query = 'SELECT n.*, h.contentstreamidentifier, h.name, h.dimensionspacepoint AS covereddimensionspacepoint + $query = 'SELECT n.*, h.contentstreamid, h.name, h.dimensionspacepoint AS covereddimensionspacepoint FROM ' . $this->tableNamePrefix . '_node n JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier + WHERE h.contentstreamid = :contentStreamId AND n.nodetypename = :nodeTypeName'; $parameters = [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'nodeTypeName' => (string)$nodeTypeName, ]; @@ -180,27 +180,27 @@ public function findNodeAggregatesByType( * @throws DBALException * @throws \Exception */ - public function findNodeAggregateByIdentifier( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + public function findNodeAggregateById( + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId ): ?NodeAggregate { $connection = $this->client->getConnection(); $query = 'SELECT n.*, - h.name, h.contentstreamidentifier, h.dimensionspacepoint AS covereddimensionspacepoint, + h.name, h.contentstreamid, h.dimensionspacepoint AS covereddimensionspacepoint, r.dimensionspacepointhash AS disableddimensionspacepointhash FROM ' . $this->tableNamePrefix . '_hierarchyrelation h JOIN ' . $this->tableNamePrefix . '_node n ON n.relationanchorpoint = h.childnodeanchor LEFT JOIN ' . $this->tableNamePrefix . '_restrictionrelation r - ON r.originnodeaggregateidentifier = n.nodeaggregateidentifier - AND r.contentstreamidentifier = h.contentstreamidentifier - AND r.affectednodeaggregateidentifier = n.nodeaggregateidentifier + ON r.originnodeaggregateid = n.nodeaggregateid + AND r.contentstreamid = h.contentstreamid + AND r.affectednodeaggregateid = n.nodeaggregateid AND r.dimensionspacepointhash = h.dimensionspacepointhash - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier'; + WHERE n.nodeaggregateid = :nodeAggregateId + AND h.contentstreamid = :contentStreamId'; $parameters = [ - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier + 'nodeAggregateId' => (string)$nodeAggregateId, + 'contentStreamId' => (string)$contentStreamId ]; $nodeRows = $connection->executeQuery($query, $parameters)->fetchAllAssociative(); @@ -217,13 +217,13 @@ public function findNodeAggregateByIdentifier( * @throws \Exception */ public function findParentNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId ): iterable { $connection = $this->client->getConnection(); $query = 'SELECT p.*, - ph.name, ph.contentstreamidentifier, ph.dimensionspacepoint AS covereddimensionspacepoint, + ph.name, ph.contentstreamid, ph.dimensionspacepoint AS covereddimensionspacepoint, r.dimensionspacepointhash AS disableddimensionspacepointhash FROM ' . $this->tableNamePrefix . '_node p JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ph @@ -232,16 +232,16 @@ public function findParentNodeAggregates( ON ch.parentnodeanchor = p.relationanchorpoint JOIN ' . $this->tableNamePrefix . '_node c ON ch.childnodeanchor = c.relationanchorpoint LEFT JOIN ' . $this->tableNamePrefix . '_restrictionrelation r - ON r.originnodeaggregateidentifier = p.nodeaggregateidentifier - AND r.contentstreamidentifier = ph.contentstreamidentifier - AND r.affectednodeaggregateidentifier = p.nodeaggregateidentifier + ON r.originnodeaggregateid = p.nodeaggregateid + AND r.contentstreamid = ph.contentstreamid + AND r.affectednodeaggregateid = p.nodeaggregateid AND r.dimensionspacepointhash = ph.dimensionspacepointhash - WHERE c.nodeaggregateidentifier = :nodeAggregateIdentifier - AND ph.contentstreamidentifier = :contentStreamIdentifier - AND ch.contentstreamidentifier = :contentStreamIdentifier'; + WHERE c.nodeaggregateid = :nodeAggregateId + AND ph.contentstreamid = :contentStreamId + AND ch.contentstreamid = :contentStreamId'; $parameters = [ - 'nodeAggregateIdentifier' => (string)$childNodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier + 'nodeAggregateId' => (string)$childNodeAggregateId, + 'contentStreamId' => (string)$contentStreamId ]; $nodeRows = $connection->executeQuery($query, $parameters)->fetchAllAssociative(); @@ -257,39 +257,39 @@ public function findParentNodeAggregates( * @throws \Exception */ public function findParentNodeAggregateByChildOriginDimensionSpacePoint( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint ): ?NodeAggregate { $connection = $this->client->getConnection(); $query = 'SELECT n.*, - h.name, h.contentstreamidentifier, h.dimensionspacepoint AS covereddimensionspacepoint, + h.name, h.contentstreamid, h.dimensionspacepoint AS covereddimensionspacepoint, r.dimensionspacepointhash AS disableddimensionspacepointhash FROM ' . $this->tableNamePrefix . '_node n JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint LEFT JOIN ' . $this->tableNamePrefix . '_restrictionrelation r - ON r.originnodeaggregateidentifier = n.nodeaggregateidentifier - AND r.contentstreamidentifier = h.contentstreamidentifier - AND r.affectednodeaggregateidentifier = n.nodeaggregateidentifier + ON r.originnodeaggregateid = n.nodeaggregateid + AND r.contentstreamid = h.contentstreamid + AND r.affectednodeaggregateid = n.nodeaggregateid AND r.dimensionspacepointhash = h.dimensionspacepointhash - WHERE n.nodeaggregateidentifier = ( - SELECT p.nodeaggregateidentifier FROM ' . $this->tableNamePrefix . '_node p + WHERE n.nodeaggregateid = ( + SELECT p.nodeaggregateid FROM ' . $this->tableNamePrefix . '_node p INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ch ON ch.parentnodeanchor = p.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_node c ON ch.childnodeanchor = c.relationanchorpoint - WHERE ch.contentstreamidentifier = :contentStreamIdentifier + WHERE ch.contentstreamid = :contentStreamId AND ch.dimensionspacepointhash = :childOriginDimensionSpacePointHash - AND c.nodeaggregateidentifier = :childNodeAggregateIdentifier + AND c.nodeaggregateid = :childNodeAggregateId AND c.origindimensionspacepointhash = :childOriginDimensionSpacePointHash ) - AND h.contentstreamidentifier = :contentStreamIdentifier'; + AND h.contentstreamid = :contentStreamId'; $parameters = [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'childNodeAggregateIdentifier' => (string)$childNodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'childNodeAggregateId' => (string)$childNodeAggregateId, 'childOriginDimensionSpacePointHash' => $childOriginDimensionSpacePoint->hash, ]; @@ -306,16 +306,16 @@ public function findParentNodeAggregateByChildOriginDimensionSpacePoint( * @throws DBALException|\Exception */ public function findChildNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId ): iterable { $connection = $this->client->getConnection(); $query = $this->createChildNodeAggregateQuery(); $parameters = [ - 'parentNodeAggregateIdentifier' => (string) $parentNodeAggregateIdentifier, - 'contentStreamIdentifier' => (string) $contentStreamIdentifier + 'parentNodeAggregateId' => (string) $parentNodeAggregateId, + 'contentStreamId' => (string) $contentStreamId ]; $nodeRows = $connection->executeQuery($query, $parameters)->fetchAllAssociative(); @@ -331,8 +331,8 @@ public function findChildNodeAggregates( * @throws DBALException|NodeTypeNotFoundException */ public function findChildNodeAggregatesByName( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId, NodeName $name ): iterable { $connection = $this->client->getConnection(); @@ -341,8 +341,8 @@ public function findChildNodeAggregatesByName( AND ch.name = :relationName'; $parameters = [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'parentNodeAggregateIdentifier' => (string)$parentNodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'parentNodeAggregateId' => (string)$parentNodeAggregateId, 'relationName' => (string)$name ]; @@ -359,8 +359,8 @@ public function findChildNodeAggregatesByName( * @throws DBALException|NodeTypeNotFoundException */ public function findTetheredChildNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId ): iterable { $connection = $this->client->getConnection(); @@ -368,8 +368,8 @@ public function findTetheredChildNodeAggregates( AND c.classification = :tetheredClassification'; $parameters = [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'parentNodeAggregateIdentifier' => (string)$parentNodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'parentNodeAggregateId' => (string)$parentNodeAggregateId, 'tetheredClassification' => NodeAggregateClassification::CLASSIFICATION_TETHERED->value ]; @@ -384,7 +384,7 @@ public function findTetheredChildNodeAggregates( private function createChildNodeAggregateQuery(): string { return 'SELECT c.*, - ch.name, ch.contentstreamidentifier, ch.dimensionspacepoint AS covereddimensionspacepoint, + ch.name, ch.contentstreamid, ch.dimensionspacepoint AS covereddimensionspacepoint, r.dimensionspacepointhash AS disableddimensionspacepointhash FROM ' . $this->tableNamePrefix . '_node p JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ph @@ -394,28 +394,28 @@ private function createChildNodeAggregateQuery(): string JOIN ' . $this->tableNamePrefix . '_node c ON ch.childnodeanchor = c.relationanchorpoint LEFT JOIN ' . $this->tableNamePrefix . '_restrictionrelation r - ON r.originnodeaggregateidentifier = p.nodeaggregateidentifier - AND r.contentstreamidentifier = ph.contentstreamidentifier - AND r.affectednodeaggregateidentifier = p.nodeaggregateidentifier + ON r.originnodeaggregateid = p.nodeaggregateid + AND r.contentstreamid = ph.contentstreamid + AND r.affectednodeaggregateid = p.nodeaggregateid AND r.dimensionspacepointhash = ph.dimensionspacepointhash - WHERE p.nodeaggregateidentifier = :parentNodeAggregateIdentifier - AND ph.contentstreamidentifier = :contentStreamIdentifier - AND ch.contentstreamidentifier = :contentStreamIdentifier'; + WHERE p.nodeaggregateid = :parentNodeAggregateId + AND ph.contentstreamid = :contentStreamId + AND ch.contentstreamid = :contentStreamId'; } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param NodeName $nodeName - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param OriginDimensionSpacePoint $parentNodeOriginDimensionSpacePoint * @param DimensionSpacePointSet $dimensionSpacePointsToCheck * @return DimensionSpacePointSet * @throws DBALException */ public function getDimensionSpacePointsOccupiedByChildNodeName( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeName $nodeName, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $parentNodeOriginDimensionSpacePoint, DimensionSpacePointSet $dimensionSpacePointsToCheck ): DimensionSpacePointSet { @@ -427,16 +427,16 @@ public function getDimensionSpacePointsOccupiedByChildNodeName( ON h.parentnodeanchor = n.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ph ON ph.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :parentNodeAggregateIdentifier + WHERE n.nodeaggregateid = :parentNodeAggregateId AND n.origindimensionspacepointhash = :parentNodeOriginDimensionSpacePointHash - AND ph.contentstreamidentifier = :contentStreamIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + AND ph.contentstreamid = :contentStreamId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash IN (:dimensionSpacePointHashes) AND h.name = :nodeName'; $parameters = [ - 'parentNodeAggregateIdentifier' => (string)$parentNodeAggregateIdentifier, + 'parentNodeAggregateId' => (string)$parentNodeAggregateId, 'parentNodeOriginDimensionSpacePointHash' => $parentNodeOriginDimensionSpacePoint->hash, - 'contentStreamIdentifier' => (string) $contentStreamIdentifier, + 'contentStreamId' => (string) $contentStreamId, 'dimensionSpacePointHashes' => $dimensionSpacePointsToCheck->getPointHashes(), 'nodeName' => (string) $nodeName ]; diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php index 9658393fa95..a8c87126957 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php @@ -21,16 +21,16 @@ use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\References; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints; use Neos\Utility\Unicode\Functions as UnicodeFunctions; @@ -61,7 +61,7 @@ final class ContentSubgraph implements ContentSubgraphInterface public readonly InMemoryCache $inMemoryCache; public function __construct( - private readonly ContentStreamIdentifier $contentStreamIdentifier, + private readonly ContentStreamId $contentStreamId, private readonly DimensionSpacePoint $dimensionSpacePoint, private readonly VisibilityConstraints $visibilityConstraints, private readonly DbalClientInterface $client, @@ -157,9 +157,9 @@ protected static function addSearchTermConstraintsToQuery( }; } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } public function getDimensionSpacePoint(): DimensionSpacePoint @@ -168,7 +168,7 @@ public function getDimensionSpacePoint(): DimensionSpacePoint } /** - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param \Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset @@ -176,7 +176,7 @@ public function getDimensionSpacePoint(): DimensionSpacePoint * @throws \Exception */ public function findChildNodes( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null @@ -192,18 +192,18 @@ public function findChildNodes( ); } - $cache = $this->inMemoryCache->getAllChildNodesByNodeIdentifierCache(); - $namedChildNodeCache = $this->inMemoryCache->getNamedChildNodeByNodeIdentifierCache(); - $parentNodeIdentifierCache = $this->inMemoryCache->getParentNodeIdentifierByChildNodeIdentifierCache(); + $cache = $this->inMemoryCache->getAllChildNodesByNodeIdCache(); + $namedChildNodeCache = $this->inMemoryCache->getNamedChildNodeByNodeIdCache(); + $parentNodeIdCache = $this->inMemoryCache->getParentNodeIdByChildNodeIdCache(); if ( $cache->contains( - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $nodeTypeConstraintsWithSubNodeTypes ) ) { return Nodes::fromArray($cache->findChildNodes( - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $nodeTypeConstraintsWithSubNodeTypes, $limit, $offset @@ -212,16 +212,16 @@ public function findChildNodes( $query = new SqlQueryBuilder(); $query->addToQuery(' -- ContentSubgraph::findChildNodes -SELECT c.*, h.name, h.contentstreamidentifier FROM ' . $this->tableNamePrefix . '_node p +SELECT c.*, h.name, h.contentstreamid FROM ' . $this->tableNamePrefix . '_node p INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.parentnodeanchor = p.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_node c ON h.childnodeanchor = c.relationanchorpoint - WHERE p.nodeaggregateidentifier = :parentNodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + WHERE p.nodeaggregateid = :parentNodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash') - ->parameter('parentNodeAggregateIdentifier', $parentNodeAggregateIdentifier) + ->parameter('parentNodeAggregateId', $parentNodeAggregateId) ->parameter( - 'contentStreamIdentifier', - (string)$this->getContentStreamIdentifier() + 'contentStreamId', + (string)$this->getContentStreamId() ) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash); @@ -242,23 +242,23 @@ public function findChildNodes( ); $result[] = $node; $namedChildNodeCache->add( - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $node->nodeName, $node ); - $parentNodeIdentifierCache->add( - $node->nodeAggregateIdentifier, - $parentNodeAggregateIdentifier + $parentNodeIdCache->add( + $node->nodeAggregateId, + $parentNodeAggregateId ); - $this->inMemoryCache->getNodeByNodeAggregateIdentifierCache()->add( - $node->nodeAggregateIdentifier, + $this->inMemoryCache->getNodeByNodeAggregateIdCache()->add( + $node->nodeAggregateId, $node ); } //if ($limit === null && $offset === null) { @todo reenable once this is supported $cache->add( - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $nodeTypeConstraintsWithSubNodeTypes, $result ); @@ -267,30 +267,30 @@ public function findChildNodes( return Nodes::fromArray($result); } - public function findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): ?Node + public function findNodeByNodeAggregateId(NodeAggregateId $nodeAggregateId): ?Node { - $cache = $this->inMemoryCache->getNodeByNodeAggregateIdentifierCache(); + $cache = $this->inMemoryCache->getNodeByNodeAggregateIdCache(); - if ($cache->knowsAbout($nodeAggregateIdentifier)) { - return $cache->get($nodeAggregateIdentifier); + if ($cache->knowsAbout($nodeAggregateId)) { + return $cache->get($nodeAggregateId); } else { $query = new SqlQueryBuilder(); $query->addToQuery(' --- ContentSubgraph::findNodeByNodeAggregateIdentifier -SELECT n.*, h.name, h.contentstreamidentifier FROM ' . $this->tableNamePrefix . '_node n +-- ContentSubgraph::findNodeByNodeAggregateId +SELECT n.*, h.name, h.contentstreamid FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + WHERE n.nodeaggregateid = :nodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash ') ->parameter( - 'nodeAggregateIdentifier', - (string)$nodeAggregateIdentifier + 'nodeAggregateId', + (string)$nodeAggregateId ) ->parameter( - 'contentStreamIdentifier', - (string)$this->getContentStreamIdentifier() + 'contentStreamId', + (string)$this->getContentStreamId() ) ->parameter( 'dimensionSpacePointHash', @@ -303,7 +303,7 @@ public function findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeA $nodeRow = $query->execute($this->getDatabaseConnection())->fetchAssociative(); if ($nodeRow === false) { - $cache->rememberNonExistingNodeAggregateIdentifier($nodeAggregateIdentifier); + $cache->rememberNonExistingNodeAggregateId($nodeAggregateId); return null; } @@ -312,7 +312,7 @@ public function findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeA $this->getDimensionSpacePoint(), $this->visibilityConstraints ); - $cache->add($nodeAggregateIdentifier, $node); + $cache->add($nodeAggregateId, $node); return $node; } @@ -333,9 +333,9 @@ private function addRestrictionRelationConstraintsToQuery( from ' . $this->tableNamePrefix . '_restrictionrelation r where - r.contentstreamidentifier = ' . $aliasOfHierarchyEdgeInQuery . '.contentstreamidentifier + r.contentstreamid = ' . $aliasOfHierarchyEdgeInQuery . '.contentstreamid and r.dimensionspacepointhash = ' . $aliasOfHierarchyEdgeInQuery . '.dimensionspacepointhash - and r.affectednodeaggregateidentifier = ' . $aliasOfNodeInQuery . '.nodeaggregateidentifier + and r.affectednodeaggregateid = ' . $aliasOfNodeInQuery . '.nodeaggregateid )', $markerToReplaceInQuery); } else { $query->addToQuery('', $markerToReplaceInQuery); @@ -345,23 +345,23 @@ private function addRestrictionRelationConstraintsToQuery( } public function countChildNodes( - NodeAggregateIdentifier $parentNodeNodeAggregateIdentifier, + NodeAggregateId $parentNodeNodeAggregateId, NodeTypeConstraints $nodeTypeConstraints = null ): int { $query = new SqlQueryBuilder(); $query->addToQuery('SELECT COUNT(*) FROM ' . $this->tableNamePrefix . '_node p INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.parentnodeanchor = p.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_node c ON h.childnodeanchor = c.relationanchorpoint - WHERE p.nodeaggregateidentifier = :parentNodeNodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + WHERE p.nodeaggregateid = :parentNodeNodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash') ->parameter( - 'parentNodeNodeAggregateIdentifier', - (string)$parentNodeNodeAggregateIdentifier + 'parentNodeNodeAggregateId', + (string)$parentNodeNodeAggregateId ) ->parameter( - 'contentStreamIdentifier', - (string)$this->getContentStreamIdentifier() + 'contentStreamId', + (string)$this->getContentStreamId() ) ->parameter( 'dimensionSpacePointHash', @@ -389,30 +389,30 @@ public function countChildNodes( * @throws \Doctrine\DBAL\DBALException */ public function findReferencedNodes( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, PropertyName $name = null ): References { $query = new SqlQueryBuilder(); $query->addToQuery( ' -- ContentSubgraph::findReferencedNodes -SELECT d.*, dh.contentstreamidentifier, dh.name, r.name AS referencename, r.properties AS referenceproperties +SELECT d.*, dh.contentstreamid, dh.name, r.name AS referencename, r.properties AS referenceproperties FROM ' . $this->tableNamePrefix . '_hierarchyrelation sh INNER JOIN ' . $this->tableNamePrefix . '_node s ON sh.childnodeanchor = s.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_referencerelation r ON s.relationanchorpoint = r.nodeanchorpoint - INNER JOIN ' . $this->tableNamePrefix . '_node d ON r.destinationnodeaggregateidentifier = d.nodeaggregateidentifier + INNER JOIN ' . $this->tableNamePrefix . '_node d ON r.destinationnodeaggregateid = d.nodeaggregateid INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation dh ON dh.childnodeanchor = d.relationanchorpoint - WHERE s.nodeaggregateidentifier = :nodeAggregateIdentifier + WHERE s.nodeaggregateid = :nodeAggregateId AND dh.dimensionspacepointhash = :dimensionSpacePointHash AND sh.dimensionspacepointhash = :dimensionSpacePointHash - AND dh.contentstreamidentifier = :contentStreamIdentifier - AND sh.contentstreamidentifier = :contentStreamIdentifier + AND dh.contentstreamid = :contentStreamId + AND sh.contentstreamid = :contentStreamId ' ) - ->parameter('nodeAggregateIdentifier', (string)$nodeAggregateIdentifier) + ->parameter('nodeAggregateId', (string)$nodeAggregateId) ->parameter( - 'contentStreamIdentifier', - (string)$this->contentStreamIdentifier + 'contentStreamId', + (string)$this->contentStreamId ) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash) ->parameter('name', (string)$name); @@ -449,31 +449,31 @@ public function findReferencedNodes( * @throws \Doctrine\DBAL\DBALException */ public function findReferencingNodes( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, PropertyName $name = null ): References { $query = new SqlQueryBuilder(); $query->addToQuery( ' -- ContentSubgraph::findReferencingNodes -SELECT s.*, sh.contentstreamidentifier, sh.name, r.name AS referencename, r.properties AS referenceproperties +SELECT s.*, sh.contentstreamid, sh.name, r.name AS referencename, r.properties AS referenceproperties FROM ' . $this->tableNamePrefix . '_hierarchyrelation sh INNER JOIN ' . $this->tableNamePrefix . '_node s ON sh.childnodeanchor = s.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_referencerelation r ON s.relationanchorpoint = r.nodeanchorpoint - INNER JOIN ' . $this->tableNamePrefix . '_node d ON r.destinationnodeaggregateidentifier = d.nodeaggregateidentifier + INNER JOIN ' . $this->tableNamePrefix . '_node d ON r.destinationnodeaggregateid = d.nodeaggregateid INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation dh ON dh.childnodeanchor = d.relationanchorpoint - WHERE d.nodeaggregateidentifier = :destinationnodeaggregateidentifier + WHERE d.nodeaggregateid = :destinationnodeaggregateid AND dh.dimensionspacepointhash = :dimensionSpacePointHash AND sh.dimensionspacepointhash = :dimensionSpacePointHash - AND dh.contentstreamidentifier = :contentStreamIdentifier - AND sh.contentstreamidentifier = :contentStreamIdentifier + AND dh.contentstreamid = :contentStreamId + AND sh.contentstreamid = :contentStreamId ' ) ->parameter( - 'destinationnodeaggregateidentifier', - (string)$nodeAggregateIdentifier + 'destinationnodeaggregateid', + (string)$nodeAggregateId ) - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash) ->parameter('name', (string)$name); @@ -490,12 +490,12 @@ public function findReferencingNodes( if ($name) { $query->addToQuery( ' - ORDER BY r.position, s.nodeaggregateidentifier' + ORDER BY r.position, s.nodeaggregateid' ); } else { $query->addToQuery( ' - ORDER BY r.name, r.position, s.nodeaggregateidentifier' + ORDER BY r.name, r.position, s.nodeaggregateid' ); } @@ -509,24 +509,24 @@ public function findReferencingNodes( } /** - * @param NodeAggregateIdentifier $childNodeAggregateIdentifier + * @param NodeAggregateId $childNodeAggregateId * @return Node|null * @throws \Doctrine\DBAL\DBALException * @throws \Exception */ - public function findParentNode(NodeAggregateIdentifier $childNodeAggregateIdentifier): ?Node + public function findParentNode(NodeAggregateId $childNodeAggregateId): ?Node { - $cache = $this->inMemoryCache->getParentNodeIdentifierByChildNodeIdentifierCache(); + $cache = $this->inMemoryCache->getParentNodeIdByChildNodeIdCache(); - if ($cache->knowsAbout($childNodeAggregateIdentifier)) { - $possibleParentIdentifier = $cache->get($childNodeAggregateIdentifier); + if ($cache->knowsAbout($childNodeAggregateId)) { + $possibleParentId = $cache->get($childNodeAggregateId); - if ($possibleParentIdentifier === null) { + if ($possibleParentId === null) { return null; } else { - // we here trigger findNodeByIdentifier, + // we here trigger findNodeById, // as this might retrieve the Parent Node from the in-memory cache if it has been loaded before - return $this->findNodeByNodeAggregateIdentifier($possibleParentIdentifier); + return $this->findNodeByNodeAggregateId($possibleParentId); } } @@ -534,21 +534,21 @@ public function findParentNode(NodeAggregateIdentifier $childNodeAggregateIdenti $query->addToQuery( ' -- ContentSubgraph::findParentNode -SELECT p.*, h.contentstreamidentifier, hp.name FROM ' . $this->tableNamePrefix . '_node p +SELECT p.*, h.contentstreamid, hp.name FROM ' . $this->tableNamePrefix . '_node p INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.parentnodeanchor = p.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_node c ON h.childnodeanchor = c.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation hp ON hp.childnodeanchor = p.relationanchorpoint - WHERE c.nodeaggregateidentifier = :childNodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier - AND hp.contentstreamidentifier = :contentStreamIdentifier + WHERE c.nodeaggregateid = :childNodeAggregateId + AND h.contentstreamid = :contentStreamId + AND hp.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash AND hp.dimensionspacepointhash = :dimensionSpacePointHash' ) ->parameter( - 'childNodeAggregateIdentifier', - (string)$childNodeAggregateIdentifier + 'childNodeAggregateId', + (string)$childNodeAggregateId ) - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash); $this->addRestrictionRelationConstraintsToQuery( @@ -565,18 +565,18 @@ public function findParentNode(NodeAggregateIdentifier $childNodeAggregateIdenti ) : null; if ($node) { $cache->add( - $childNodeAggregateIdentifier, - $node->nodeAggregateIdentifier + $childNodeAggregateId, + $node->nodeAggregateId ); - // we also add the parent node to the NodeAggregateIdentifier => Node cache; + // we also add the parent node to the NodeAggregateId => Node cache; // as this might improve cache hit rates as well. - $this->inMemoryCache->getNodeByNodeAggregateIdentifierCache()->add( - $node->nodeAggregateIdentifier, + $this->inMemoryCache->getNodeByNodeAggregateIdCache()->add( + $node->nodeAggregateId, $node ); } else { - $cache->rememberNonExistingParentNode($childNodeAggregateIdentifier); + $cache->rememberNonExistingParentNode($childNodeAggregateId); } return $node; @@ -584,24 +584,24 @@ public function findParentNode(NodeAggregateIdentifier $childNodeAggregateIdenti /** * @param \Neos\ContentRepository\Core\Projection\ContentGraph\NodePath $path - * @param NodeAggregateIdentifier $startingNodeAggregateIdentifier + * @param NodeAggregateId $startingNodeAggregateId * @return Node|null * @throws \Doctrine\DBAL\DBALException */ public function findNodeByPath( NodePath $path, - NodeAggregateIdentifier $startingNodeAggregateIdentifier + NodeAggregateId $startingNodeAggregateId ): ?Node { - $currentNode = $this->findNodeByNodeAggregateIdentifier($startingNodeAggregateIdentifier); + $currentNode = $this->findNodeByNodeAggregateId($startingNodeAggregateId); if (!$currentNode) { throw new \RuntimeException( - 'Starting Node (identified by ' . $startingNodeAggregateIdentifier . ') does not exist.' + 'Starting Node (identified by ' . $startingNodeAggregateId . ') does not exist.' ); } foreach ($path->getParts() as $edgeName) { - // identifier exists here :) + // id exists here :) $currentNode = $this->findChildNodeConnectedThroughEdgeName( - $currentNode->nodeAggregateIdentifier, + $currentNode->nodeAggregateId, $edgeName ); if (!$currentNode) { @@ -613,18 +613,18 @@ public function findNodeByPath( } /** - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param NodeName $edgeName * @return Node|null * @throws \Doctrine\DBAL\DBALException */ public function findChildNodeConnectedThroughEdgeName( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeName $edgeName ): ?Node { - $cache = $this->inMemoryCache->getNamedChildNodeByNodeIdentifierCache(); - if ($cache->contains($parentNodeAggregateIdentifier, $edgeName)) { - return $cache->get($parentNodeAggregateIdentifier, $edgeName); + $cache = $this->inMemoryCache->getNamedChildNodeByNodeIdCache(); + if ($cache->contains($parentNodeAggregateId, $edgeName)) { + return $cache->get($parentNodeAggregateId, $edgeName); } else { $query = new SqlQueryBuilder(); $query->addToQuery( @@ -633,7 +633,7 @@ public function findChildNodeConnectedThroughEdgeName( SELECT c.*, h.name, - h.contentstreamidentifier + h.contentstreamid FROM ' . $this->tableNamePrefix . '_node p INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h @@ -641,18 +641,18 @@ public function findChildNodeConnectedThroughEdgeName( INNER JOIN ' . $this->tableNamePrefix . '_node c ON h.childnodeanchor = c.relationanchorpoint WHERE - p.nodeaggregateidentifier = :parentNodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + p.nodeaggregateid = :parentNodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash AND h.name = :edgeName' ) ->parameter( - 'parentNodeAggregateIdentifier', - (string)$parentNodeAggregateIdentifier + 'parentNodeAggregateId', + (string)$parentNodeAggregateId ) ->parameter( - 'contentStreamIdentifier', - (string)$this->contentStreamIdentifier + 'contentStreamId', + (string)$this->contentStreamId ) ->parameter( 'dimensionSpacePointHash', @@ -676,12 +676,12 @@ public function findChildNodeConnectedThroughEdgeName( $this->visibilityConstraints ); $cache->add( - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $edgeName, $node ); - $this->inMemoryCache->getNodeByNodeAggregateIdentifierCache()->add( - $node->nodeAggregateIdentifier, + $this->inMemoryCache->getNodeByNodeAggregateIdCache()->add( + $node->nodeAggregateId, $node ); return $node; @@ -692,7 +692,7 @@ public function findChildNodeConnectedThroughEdgeName( } /** - * @param NodeAggregateIdentifier $sibling + * @param NodeAggregateId $sibling * @param \Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset @@ -701,16 +701,16 @@ public function findChildNodeConnectedThroughEdgeName( * @throws \Exception */ public function findSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes { $query = new SqlQueryBuilder(); $query->addToQuery($this->getSiblingBaseQuery() . ' - AND n.nodeaggregateidentifier != :siblingNodeAggregateIdentifier') - ->parameter('siblingNodeAggregateIdentifier', (string)$sibling) - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + AND n.nodeaggregateid != :siblingNodeAggregateId') + ->parameter('siblingNodeAggregateId', (string)$sibling) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash); if ($nodeTypeConstraints) { @@ -741,7 +741,7 @@ public function findSiblings( } /** - * @param NodeAggregateIdentifier $sibling + * @param NodeAggregateId $sibling * @param \Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset @@ -750,16 +750,16 @@ public function findSiblings( * @throws \Exception */ public function findPrecedingSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes { $query = new SqlQueryBuilder(); $query->addToQuery($this->getSiblingBaseQuery() . ' - AND n.nodeaggregateidentifier != :siblingNodeAggregateIdentifier') - ->parameter('siblingNodeAggregateIdentifier', (string)$sibling) - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + AND n.nodeaggregateid != :siblingNodeAggregateId') + ->parameter('siblingNodeAggregateId', (string)$sibling) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash); $this->addRestrictionRelationConstraintsToQuery($query); @@ -767,8 +767,8 @@ public function findPrecedingSiblings( AND h.position < ( SELECT sibh.position FROM ' . $this->tableNamePrefix . '_hierarchyrelation sibh INNER JOIN ' . $this->tableNamePrefix . '_node sib ON sibh.childnodeanchor = sib.relationanchorpoint - WHERE sib.nodeaggregateidentifier = :siblingNodeAggregateIdentifier - AND sibh.contentstreamidentifier = :contentStreamIdentifier + WHERE sib.nodeaggregateid = :siblingNodeAggregateId + AND sibh.contentstreamid = :contentStreamId AND sibh.dimensionspacepointhash = :dimensionSpacePointHash )'); @@ -800,7 +800,7 @@ public function findPrecedingSiblings( } /** - * @param NodeAggregateIdentifier $sibling + * @param NodeAggregateId $sibling * @param \Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset @@ -809,16 +809,16 @@ public function findPrecedingSiblings( * @throws \Exception */ public function findSucceedingSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes { $query = new SqlQueryBuilder(); $query->addToQuery($this->getSiblingBaseQuery() . ' - AND n.nodeaggregateidentifier != :siblingNodeAggregateIdentifier') - ->parameter('siblingNodeAggregateIdentifier', (string)$sibling) - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + AND n.nodeaggregateid != :siblingNodeAggregateId') + ->parameter('siblingNodeAggregateId', (string)$sibling) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash); $this->addRestrictionRelationConstraintsToQuery($query); @@ -826,8 +826,8 @@ public function findSucceedingSiblings( AND h.position > ( SELECT sibh.position FROM ' . $this->tableNamePrefix . '_hierarchyrelation sibh INNER JOIN ' . $this->tableNamePrefix . '_node sib ON sibh.childnodeanchor = sib.relationanchorpoint - WHERE sib.nodeaggregateidentifier = :siblingNodeAggregateIdentifier - AND sibh.contentstreamidentifier = :contentStreamIdentifier + WHERE sib.nodeaggregateid = :siblingNodeAggregateId + AND sibh.contentstreamid = :contentStreamId AND sibh.dimensionspacepointhash = :dimensionSpacePointHash )'); @@ -861,14 +861,14 @@ public function findSucceedingSiblings( protected function getSiblingBaseQuery(): string { return ' - SELECT n.*, h.contentstreamidentifier, h.name FROM ' . $this->tableNamePrefix . '_node n + SELECT n.*, h.contentstreamid, h.name FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier AND h.dimensionspacepointhash = :dimensionSpacePointHash + WHERE h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash AND h.parentnodeanchor = ( SELECT sibh.parentnodeanchor FROM ' . $this->tableNamePrefix . '_hierarchyrelation sibh INNER JOIN ' . $this->tableNamePrefix . '_node sib ON sibh.childnodeanchor = sib.relationanchorpoint - WHERE sib.nodeaggregateidentifier = :siblingNodeAggregateIdentifier - AND sibh.contentstreamidentifier = :contentStreamIdentifier + WHERE sib.nodeaggregateid = :siblingNodeAggregateId + AND sibh.contentstreamid = :contentStreamId AND sibh.dimensionspacepointhash = :dimensionSpacePointHash )'; } @@ -879,13 +879,13 @@ protected function getDatabaseConnection(): Connection } - public function findNodePath(NodeAggregateIdentifier $nodeAggregateIdentifier): NodePath + public function findNodePath(NodeAggregateId $nodeAggregateId): NodePath { $cache = $this->inMemoryCache->getNodePathCache(); - if ($cache->contains($nodeAggregateIdentifier)) { + if ($cache->contains($nodeAggregateId)) { /** @var \Neos\ContentRepository\Core\Projection\ContentGraph\NodePath $nodePath */ - $nodePath = $cache->get($nodeAggregateIdentifier); + $nodePath = $cache->get($nodeAggregateId); return $nodePath; } @@ -896,24 +896,24 @@ public function findNodePath(NodeAggregateIdentifier $nodeAggregateIdentifier): SELECT h.name, h.parentnodeanchor FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash - AND n.nodeaggregateidentifier = :nodeAggregateIdentifier + AND n.nodeaggregateid = :nodeAggregateId UNION SELECT h.name, h.parentnodeanchor FROM ' . $this->tableNamePrefix . '_hierarchyrelation h INNER JOIN nodePath as np ON h.childnodeanchor = np.parentnodeanchor WHERE - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash ) select * from nodePath', [ - 'contentStreamIdentifier' => (string)$this->getContentStreamIdentifier(), + 'contentStreamId' => (string)$this->getContentStreamId(), 'dimensionSpacePointHash' => $this->getDimensionSpacePoint()->hash, - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier + 'nodeAggregateId' => (string)$nodeAggregateId ] )->fetchAllAssociative(); @@ -925,7 +925,7 @@ public function findNodePath(NodeAggregateIdentifier $nodeAggregateIdentifier): $nodePathSegments = array_reverse($nodePathSegments); $nodePath = NodePath::fromPathSegments($nodePathSegments); - $cache->add($nodeAggregateIdentifier, $nodePath); + $cache->add($nodeAggregateId, $nodePath); return $nodePath; } @@ -936,7 +936,7 @@ public function findNodePath(NodeAggregateIdentifier $nodeAggregateIdentifier): public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, + 'contentStreamId' => $this->contentStreamId, 'dimensionSpacePoint' => $this->dimensionSpacePoint ]; } @@ -947,7 +947,7 @@ public function jsonSerialize(): array * @throws NodeTypeNotFoundException */ public function findSubtrees( - NodeAggregateIdentifiers $entryNodeAggregateIdentifiers, + NodeAggregateIds $entryNodeAggregateIds, int $maximumLevels, NodeTypeConstraints $nodeTypeConstraints ): Subtree { @@ -959,16 +959,16 @@ public function findSubtrees( -- Because the menu supports starting at multiple nodes, we also support starting at multiple nodes at once. with recursive tree as ( -- -------------------------------- - -- INITIAL query: select the root nodes of the tree; as given in $menuLevelNodeIdentifiers + -- INITIAL query: select the root nodes of the tree; as given in $menuLevelNodeIds -- -------------------------------- select n.*, - h.contentstreamidentifier, + h.contentstreamid, h.name, -- see -- https://mariadb.com/kb/en/library/recursive-common-table-expressions-overview/#cast-to-avoid-data-truncation - CAST("ROOT" AS CHAR(50)) as parentNodeAggregateIdentifier, + CAST("ROOT" AS CHAR(50)) as parentNodeAggregateId, 0 as level, 0 as position from @@ -977,8 +977,8 @@ public function findSubtrees( inner join ' . $this->tableNamePrefix . '_hierarchyrelation h on h.childnodeanchor = n.relationanchorpoint where - n.nodeaggregateidentifier in (:entryNodeAggregateIdentifiers) - and h.contentstreamidentifier = :contentStreamIdentifier + n.nodeaggregateid in (:entryNodeAggregateIds) + and h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash ###VISIBILITY_CONSTRAINTS_INITIAL### union @@ -987,10 +987,10 @@ public function findSubtrees( -- -------------------------------- select c.*, - h.contentstreamidentifier, + h.contentstreamid, h.name, - p.nodeaggregateidentifier as parentNodeAggregateIdentifier, + p.nodeaggregateid as parentNodeAggregateId, p.level + 1 as level, h.position from @@ -1000,7 +1000,7 @@ public function findSubtrees( inner join ' . $this->tableNamePrefix . '_node c on h.childnodeanchor = c.relationanchorpoint where - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash and p.level + 1 <= :maximumLevels ###NODE_TYPE_CONSTRAINTS### @@ -1011,11 +1011,11 @@ public function findSubtrees( select * from tree order by level asc, position asc;') ->parameter( - 'entryNodeAggregateIdentifiers', - $entryNodeAggregateIdentifiers->toStringArray(), + 'entryNodeAggregateIds', + $entryNodeAggregateIds->toStringArray(), Connection::PARAM_STR_ARRAY ) - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash) ->parameter('maximumLevels', $maximumLevels); @@ -1044,8 +1044,8 @@ public function findSubtrees( $result = $query->execute($this->getDatabaseConnection())->fetchAllAssociative(); - $subtreesByNodeIdentifier = []; - $subtreesByNodeIdentifier['ROOT'] = new Subtree(0); + $subtreesByNodeId = []; + $subtreesByNodeId['ROOT'] = new Subtree(0); foreach ($result as $nodeData) { $node = $this->nodeFactory->mapNodeRowToNode( @@ -1053,40 +1053,40 @@ public function findSubtrees( $this->getDimensionSpacePoint(), $this->visibilityConstraints ); - $this->inMemoryCache->getNodeByNodeAggregateIdentifierCache()->add( - $node->nodeAggregateIdentifier, + $this->inMemoryCache->getNodeByNodeAggregateIdCache()->add( + $node->nodeAggregateId, $node ); - if (!isset($subtreesByNodeIdentifier[$nodeData['parentNodeAggregateIdentifier']])) { + if (!isset($subtreesByNodeId[$nodeData['parentNodeAggregateId']])) { throw new \Exception('TODO: must not happen'); } $subtree = new Subtree((int)$nodeData['level'], $node); - $subtreesByNodeIdentifier[$nodeData['parentNodeAggregateIdentifier']]->add($subtree); - $subtreesByNodeIdentifier[$nodeData['nodeaggregateidentifier']] = $subtree; + $subtreesByNodeId[$nodeData['parentNodeAggregateId']]->add($subtree); + $subtreesByNodeId[$nodeData['nodeaggregateid']] = $subtree; // also add the parents to the child -> parent cache. /* @var $parentSubtree Subtree */ - $parentSubtree = $subtreesByNodeIdentifier[$nodeData['parentNodeAggregateIdentifier']]; + $parentSubtree = $subtreesByNodeId[$nodeData['parentNodeAggregateId']]; if ($parentSubtree->node !== null) { - $this->inMemoryCache->getParentNodeIdentifierByChildNodeIdentifierCache()->add( - $node->nodeAggregateIdentifier, - $parentSubtree->node->nodeAggregateIdentifier + $this->inMemoryCache->getParentNodeIdByChildNodeIdCache()->add( + $node->nodeAggregateId, + $parentSubtree->node->nodeAggregateId ); } } - return $subtreesByNodeIdentifier['ROOT']; + return $subtreesByNodeId['ROOT']; } /** - * @param array $entryNodeAggregateIdentifiers + * @param array $entryNodeAggregateIds * @throws \Doctrine\DBAL\Exception * @throws NodeTypeNotFoundException */ public function findDescendants( - array $entryNodeAggregateIdentifiers, + array $entryNodeAggregateIds, NodeTypeConstraints $nodeTypeConstraints, ?\Neos\ContentRepository\Core\Projection\ContentGraph\SearchTerm $searchTerm ): Nodes { @@ -1101,12 +1101,12 @@ public function findDescendants( -- -------------------------------- select n.*, - h.contentstreamidentifier, + h.contentstreamid, h.name, -- see -- https://mariadb.com/kb/en/library/recursive-common-table-expressions-overview/#cast-to-avoid-data-truncation - CAST("ROOT" AS CHAR(50)) as parentNodeAggregateIdentifier, + CAST("ROOT" AS CHAR(50)) as parentNodeAggregateId, 0 as level, 0 as position from @@ -1119,10 +1119,10 @@ public function findDescendants( INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ph on ph.childnodeanchor = p.relationanchorpoint WHERE - p.nodeaggregateidentifier in (:entryNodeAggregateIdentifiers) - AND h.contentstreamidentifier = :contentStreamIdentifier + p.nodeaggregateid in (:entryNodeAggregateIds) + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash - AND ph.contentstreamidentifier = :contentStreamIdentifier + AND ph.contentstreamid = :contentStreamId AND ph.dimensionspacepointhash = :dimensionSpacePointHash ###VISIBILITY_CONSTRAINTS_INITIAL### union @@ -1131,10 +1131,10 @@ public function findDescendants( -- -------------------------------- select c.*, - h.contentstreamidentifier, + h.contentstreamid, h.name, - p.nodeaggregateidentifier as parentNodeAggregateIdentifier, + p.nodeaggregateid as parentNodeAggregateId, p.level + 1 as level, h.position from @@ -1144,7 +1144,7 @@ public function findDescendants( inner join ' . $this->tableNamePrefix . '_node c on h.childnodeanchor = c.relationanchorpoint where - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash ###VISIBILITY_CONSTRAINTS_RECURSION### @@ -1156,13 +1156,13 @@ public function findDescendants( ###NODE_TYPE_CONSTRAINTS### ###SEARCH_TERM_CONSTRAINTS### order by level asc, position asc;') - ->parameter('entryNodeAggregateIdentifiers', array_map( - function (NodeAggregateIdentifier $nodeAggregateIdentifier): string { - return (string)$nodeAggregateIdentifier; + ->parameter('entryNodeAggregateIds', array_map( + function (NodeAggregateId $nodeAggregateId): string { + return (string)$nodeAggregateId; }, - $entryNodeAggregateIdentifiers + $entryNodeAggregateIds ), Connection::PARAM_STR_ARRAY) - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash); $nodeTypeConstraintsWithSubNodeTypes = NodeTypeConstraintsWithSubNodeTypes::create( @@ -1217,9 +1217,9 @@ public function countNodes(): int $query->addToQuery(' SELECT COUNT(*) FROM ' . $this->tableNamePrefix . '_node n JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE h.contentstreamidentifier = :contentStreamIdentifier + WHERE h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash') - ->parameter('contentStreamIdentifier', (string)$this->contentStreamIdentifier) + ->parameter('contentStreamId', (string)$this->contentStreamId) ->parameter('dimensionSpacePointHash', $this->getDimensionSpacePoint()->hash); $row = $query->execute($this->getDatabaseConnection())->fetchAssociative(); diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache.php index 3aeb517896a..f56263e4c1a 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache.php @@ -14,13 +14,12 @@ namespace Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository; -use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\AllChildNodesByNodeIdentifierCache; -use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\NamedChildNodeByNodeIdentifierCache; -use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\NodeByNodeAggregateIdentifierCache; +use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\AllChildNodesByNodeIdCache; +use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\NamedChildNodeByNodeIdCache; +use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\NodeByNodeAggregateIdCache; use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\NodePathCache; -// @codingStandardsIgnoreStart -use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\ParentNodeIdentifierByChildNodeIdentifierCache; -// @codingStandardsIgnoreEnd +use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache\ParentNodeIdByChildNodeIdCache; + /** * Accessors to in Memory Cache * @@ -37,24 +36,24 @@ final class InMemoryCache private $nodePathCache; /** - * @var NodeByNodeAggregateIdentifierCache + * @var NodeByNodeAggregateIdCache */ - private $nodeByNodeAggregateIdentifierCache; + private $nodeByNodeAggregateIdCache; /** - * @var AllChildNodesByNodeIdentifierCache + * @var AllChildNodesByNodeIdCache */ - private $allChildNodesByNodeIdentifierCache; + private $allChildNodesByNodeIdCache; /** - * @var NamedChildNodeByNodeIdentifierCache + * @var NamedChildNodeByNodeIdCache */ - private $namedChildNodeByNodeIdentifierCache; + private $namedChildNodeByNodeIdCache; /** - * @var ParentNodeIdentifierByChildNodeIdentifierCache + * @var ParentNodeIdByChildNodeIdCache */ - private $parentNodeIdentifierByChildNodeIdentifierCache; + private $parentNodeIdByChildNodeIdCache; public function __construct() { @@ -86,33 +85,33 @@ public function getNodePathCache(): NodePathCache return $this->nodePathCache; } - public function getNodeByNodeAggregateIdentifierCache(): NodeByNodeAggregateIdentifierCache + public function getNodeByNodeAggregateIdCache(): NodeByNodeAggregateIdCache { - return $this->nodeByNodeAggregateIdentifierCache; + return $this->nodeByNodeAggregateIdCache; } /** - * @return AllChildNodesByNodeIdentifierCache + * @return AllChildNodesByNodeIdCache */ - public function getAllChildNodesByNodeIdentifierCache(): AllChildNodesByNodeIdentifierCache + public function getAllChildNodesByNodeIdCache(): AllChildNodesByNodeIdCache { - return $this->allChildNodesByNodeIdentifierCache; + return $this->allChildNodesByNodeIdCache; } /** - * @return NamedChildNodeByNodeIdentifierCache + * @return NamedChildNodeByNodeIdCache */ - public function getNamedChildNodeByNodeIdentifierCache(): NamedChildNodeByNodeIdentifierCache + public function getNamedChildNodeByNodeIdCache(): NamedChildNodeByNodeIdCache { - return $this->namedChildNodeByNodeIdentifierCache; + return $this->namedChildNodeByNodeIdCache; } /** - * @return ParentNodeIdentifierByChildNodeIdentifierCache + * @return ParentNodeIdByChildNodeIdCache */ - public function getParentNodeIdentifierByChildNodeIdentifierCache(): ParentNodeIdentifierByChildNodeIdentifierCache + public function getParentNodeIdByChildNodeIdCache(): ParentNodeIdByChildNodeIdCache { - return $this->parentNodeIdentifierByChildNodeIdentifierCache; + return $this->parentNodeIdByChildNodeIdCache; } /** @@ -121,10 +120,10 @@ public function getParentNodeIdentifierByChildNodeIdentifierCache(): ParentNodeI private function reset(bool $isEnabled): void { $this->nodePathCache = new NodePathCache($isEnabled); - $this->nodeByNodeAggregateIdentifierCache = new NodeByNodeAggregateIdentifierCache($isEnabled); - $this->allChildNodesByNodeIdentifierCache = new AllChildNodesByNodeIdentifierCache($isEnabled); - $this->namedChildNodeByNodeIdentifierCache = new NamedChildNodeByNodeIdentifierCache($isEnabled); - $this->parentNodeIdentifierByChildNodeIdentifierCache - = new ParentNodeIdentifierByChildNodeIdentifierCache($isEnabled); + $this->nodeByNodeAggregateIdCache = new NodeByNodeAggregateIdCache($isEnabled); + $this->allChildNodesByNodeIdCache = new AllChildNodesByNodeIdCache($isEnabled); + $this->namedChildNodeByNodeIdCache = new NamedChildNodeByNodeIdCache($isEnabled); + $this->parentNodeIdByChildNodeIdCache + = new ParentNodeIdByChildNodeIdCache($isEnabled); } } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/AllChildNodesByNodeIdentifierCache.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/AllChildNodesByNodeIdCache.php similarity index 83% rename from Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/AllChildNodesByNodeIdentifierCache.php rename to Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/AllChildNodesByNodeIdCache.php index b9522d6a42b..1c1a0fbfc00 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/AllChildNodesByNodeIdentifierCache.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/AllChildNodesByNodeIdCache.php @@ -15,15 +15,15 @@ namespace Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraintsWithSubNodeTypes; /** - * This cache is only filled for a $parentNodeIdentifier if we have retrieved *all* childNodes, without any restriction. + * This cache is only filled for a $parentNodeId if we have retrieved *all* childNodes, without any restriction. * * @internal */ -final class AllChildNodesByNodeIdentifierCache +final class AllChildNodesByNodeIdCache { /** * @var array>> @@ -41,7 +41,7 @@ public function __construct(bool $isEnabled) * @param array $allChildNodes */ public function add( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraintsWithSubNodeTypes $nodeTypeConstraintsWithSubNodeTypes, array $allChildNodes ): void { @@ -49,19 +49,19 @@ public function add( return; } - $key = (string)$parentNodeAggregateIdentifier; + $key = (string)$parentNodeAggregateId; $this->childNodes[$key][(string)$nodeTypeConstraintsWithSubNodeTypes] = $allChildNodes; } public function contains( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraintsWithSubNodeTypes $nodeTypeConstraintsWithSubNodeTypes ): bool { if ($this->isEnabled === false) { return false; } - $key = (string)$parentNodeAggregateIdentifier; + $key = (string)$parentNodeAggregateId; return isset($this->childNodes[$key][(string)$nodeTypeConstraintsWithSubNodeTypes]); } @@ -69,7 +69,7 @@ public function contains( * @return array */ public function findChildNodes( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraintsWithSubNodeTypes $nodeTypeConstraintsWithSubNodeTypes, int $limit = null, int $offset = null @@ -78,7 +78,7 @@ public function findChildNodes( return []; } - $key = (string)$parentNodeAggregateIdentifier; + $key = (string)$parentNodeAggregateId; $result = []; if (isset($this->childNodes[$key][(string)$nodeTypeConstraintsWithSubNodeTypes])) { diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NamedChildNodeByNodeIdentifierCache.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NamedChildNodeByNodeIdCache.php similarity index 67% rename from Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NamedChildNodeByNodeIdentifierCache.php rename to Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NamedChildNodeByNodeIdCache.php index 6ec6e0fc628..91cad489fc4 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NamedChildNodeByNodeIdentifierCache.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NamedChildNodeByNodeIdCache.php @@ -15,18 +15,18 @@ namespace Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; /** - * Parent Node Identifier + Node Name => Child Node + * Parent Node ID + Node Name => Child Node * * @internal */ -final class NamedChildNodeByNodeIdentifierCache +final class NamedChildNodeByNodeIdCache { /** - * first level: Parent Node Identifier + * first level: Parent Node ID * Second Level: Node Name * Value: Node * @var array> @@ -41,7 +41,7 @@ public function __construct(bool $isEnabled) } public function add( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, ?NodeName $nodeName, Node $node ): void { @@ -53,24 +53,24 @@ public function add( return; } - $this->nodes[(string)$parentNodeAggregateIdentifier][(string)$nodeName] = $node; + $this->nodes[(string)$parentNodeAggregateId][(string)$nodeName] = $node; } - public function contains(NodeAggregateIdentifier $parentNodeAggregateIdentifier, NodeName $nodeName): bool + public function contains(NodeAggregateId $parentNodeAggregateId, NodeName $nodeName): bool { if ($this->isEnabled === false) { return false; } - return isset($this->nodes[(string)$parentNodeAggregateIdentifier][(string)$nodeName]); + return isset($this->nodes[(string)$parentNodeAggregateId][(string)$nodeName]); } - public function get(NodeAggregateIdentifier $parentNodeAggregateIdentifier, NodeName $nodeName): ?Node + public function get(NodeAggregateId $parentNodeAggregateId, NodeName $nodeName): ?Node { if ($this->isEnabled === false) { return null; } - return $this->nodes[(string)$parentNodeAggregateIdentifier][(string)$nodeName] ?? null; + return $this->nodes[(string)$parentNodeAggregateId][(string)$nodeName] ?? null; } } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodeByNodeAggregateIdentifierCache.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodeByNodeAggregateIdCache.php similarity index 60% rename from Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodeByNodeAggregateIdentifierCache.php rename to Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodeByNodeAggregateIdCache.php index 320f01a7e5e..dc61ce332dd 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodeByNodeAggregateIdentifierCache.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodeByNodeAggregateIdCache.php @@ -14,17 +14,17 @@ namespace Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; /** - * NodeAggregateIdentifier -> Node cache + * NodeAggregateId -> Node cache * - * also contains a *blacklist* of unknown NodeAggregateIdentifiers. + * also contains a *blacklist* of unknown NodeAggregateIds. * * @internal */ -final class NodeByNodeAggregateIdentifierCache +final class NodeByNodeAggregateIdCache { /** * @var array @@ -34,7 +34,7 @@ final class NodeByNodeAggregateIdentifierCache /** * @var array */ - protected array $nonExistingNodeAggregateIdentifiers = []; + protected array $nonExistingNodeAggregateIds = []; protected bool $isEnabled; @@ -46,43 +46,43 @@ public function __construct(bool $isEnabled) /** * basically like "contains" */ - public function knowsAbout(NodeAggregateIdentifier $nodeAggregateIdentifier): bool + public function knowsAbout(NodeAggregateId $nodeAggregateId): bool { if ($this->isEnabled === false) { return false; } - $key = (string)$nodeAggregateIdentifier; - return isset($this->nodes[$key]) || isset($this->nonExistingNodeAggregateIdentifiers[$key]); + $key = (string)$nodeAggregateId; + return isset($this->nodes[$key]) || isset($this->nonExistingNodeAggregateIds[$key]); } - public function add(NodeAggregateIdentifier $nodeAggregateIdentifier, Node $node): void + public function add(NodeAggregateId $nodeAggregateId, Node $node): void { if ($this->isEnabled === false) { return; } - $key = (string)$nodeAggregateIdentifier; + $key = (string)$nodeAggregateId; $this->nodes[$key] = $node; } - public function rememberNonExistingNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): void + public function rememberNonExistingNodeAggregateId(NodeAggregateId $nodeAggregateId): void { if ($this->isEnabled === false) { return; } - $key = (string)$nodeAggregateIdentifier; - $this->nonExistingNodeAggregateIdentifiers[$key] = true; + $key = (string)$nodeAggregateId; + $this->nonExistingNodeAggregateIds[$key] = true; } - public function get(NodeAggregateIdentifier $nodeAggregateIdentifier): ?Node + public function get(NodeAggregateId $nodeAggregateId): ?Node { if ($this->isEnabled === false) { return null; } - $key = (string)$nodeAggregateIdentifier; + $key = (string)$nodeAggregateId; return $this->nodes[$key] ?? null; } } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodePathCache.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodePathCache.php index 2338c00e021..f254f4dcd8b 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodePathCache.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/NodePathCache.php @@ -14,11 +14,11 @@ namespace Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; /** - * Node Identifier -> Node Path cache + * Node ID -> Node Path cache * * @internal */ @@ -36,30 +36,30 @@ public function __construct(bool $isEnabled) $this->isEnabled = $isEnabled; } - public function contains(NodeAggregateIdentifier $nodeAggregateIdentifier): bool + public function contains(NodeAggregateId $nodeAggregateId): bool { if ($this->isEnabled === false) { return false; } - $key = (string)$nodeAggregateIdentifier; + $key = (string)$nodeAggregateId; return isset($this->nodePaths[$key]); } - public function add(NodeAggregateIdentifier $nodeAggregateIdentifier, NodePath $nodePath): void + public function add(NodeAggregateId $nodeAggregateId, NodePath $nodePath): void { if ($this->isEnabled === false) { return; } - $key = (string)$nodeAggregateIdentifier; + $key = (string)$nodeAggregateId; $this->nodePaths[$key] = $nodePath; } - public function get(NodeAggregateIdentifier $nodeAggregateIdentifier): ?NodePath + public function get(NodeAggregateId $nodeAggregateId): ?NodePath { if ($this->isEnabled === false) { return null; } - $key = (string)$nodeAggregateIdentifier; + $key = (string)$nodeAggregateId; return $this->nodePaths[$key] ?? null; } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/ParentNodeIdentifierByChildNodeIdentifierCache.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/ParentNodeIdByChildNodeIdCache.php similarity index 54% rename from Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/ParentNodeIdentifierByChildNodeIdentifierCache.php rename to Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/ParentNodeIdByChildNodeIdCache.php index 76a735ae8b7..9cdd7c24f75 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/ParentNodeIdentifierByChildNodeIdentifierCache.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/InMemoryCache/ParentNodeIdByChildNodeIdCache.php @@ -14,21 +14,21 @@ namespace Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\InMemoryCache; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** - * NOTE: we do NOT directly cache the Parent Node; but only the Parent Node Identifier; - * as then, the NodeByNodeIdentifierCache can be used properly + * NOTE: we do NOT directly cache the Parent Node; but only the Parent Node ID; + * as then, the NodeByNodeIdCache can be used properly * - thus it might increase the cache hit rate to split this apart. * * @internal */ -final class ParentNodeIdentifierByChildNodeIdentifierCache +final class ParentNodeIdByChildNodeIdCache { /** - * @var array + * @var array */ - protected array $parentNodeAggregateIdentifiers = []; + protected array $parentNodeAggregateIds = []; /** * @var array @@ -42,46 +42,44 @@ public function __construct(bool $isEnabled) $this->isEnabled = $isEnabled; } - public function add( - NodeAggregateIdentifier $childNodeAggregateIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier - ): void { + public function add(NodeAggregateId $childNodeAggregateId, NodeAggregateId $parentNodeAggregateId): void + { if ($this->isEnabled === false) { return; } - $key = (string)$childNodeAggregateIdentifier; - $this->parentNodeAggregateIdentifiers[$key] = $parentNodeAggregateIdentifier; + $key = (string)$childNodeAggregateId; + $this->parentNodeAggregateIds[$key] = $parentNodeAggregateId; } - public function knowsAbout(NodeAggregateIdentifier $childNodeAggregateIdentifier): bool + public function knowsAbout(NodeAggregateId $childNodeAggregateId): bool { if ($this->isEnabled === false) { return false; } - $key = (string)$childNodeAggregateIdentifier; - return isset($this->parentNodeAggregateIdentifiers[$key]) || isset($this->nodesWithoutParentNode[$key]); + $key = (string)$childNodeAggregateId; + return isset($this->parentNodeAggregateIds[$key]) || isset($this->nodesWithoutParentNode[$key]); } - public function rememberNonExistingParentNode(NodeAggregateIdentifier $nodeAggregateIdentifier): void + public function rememberNonExistingParentNode(NodeAggregateId $nodeAggregateId): void { if ($this->isEnabled === false) { return; } - $key = (string)$nodeAggregateIdentifier; + $key = (string)$nodeAggregateId; $this->nodesWithoutParentNode[$key] = true; } - public function get(NodeAggregateIdentifier $childNodeAggregateIdentifier): ?NodeAggregateIdentifier + public function get(NodeAggregateId $childNodeAggregateId): ?NodeAggregateId { if ($this->isEnabled === false) { return null; } - $key = (string)$childNodeAggregateIdentifier; - return $this->parentNodeAggregateIdentifiers[$key] ?? null; + $key = (string)$childNodeAggregateId; + return $this->parentNodeAggregateIds[$key] ?? null; } } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php index b8eb69b7b28..0c3a87b8ee8 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php @@ -16,14 +16,14 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\Reference; use Neos\ContentRepository\Core\Projection\ContentGraph\References; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; use Neos\ContentRepository\Core\Projection\ContentGraph\CoverageByOrigin; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; @@ -47,7 +47,7 @@ final class NodeFactory { public function __construct( - private readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + private readonly ContentRepositoryId $contentRepositoryId, private readonly NodeTypeManager $nodeTypeManager, private readonly PropertyConverter $propertyConverter ) { @@ -65,12 +65,12 @@ public function mapNodeRowToNode( $nodeType = $this->nodeTypeManager->getNodeType($nodeRow['nodetypename']); $node = new Node( ContentSubgraphIdentity::create( - $this->contentRepositoryIdentifier, - ContentStreamIdentifier::fromString($nodeRow['contentstreamidentifier']), + $this->contentRepositoryId, + ContentStreamId::fromString($nodeRow['contentstreamid']), $dimensionSpacePoint, $visibilityConstraints ), - NodeAggregateIdentifier::fromString($nodeRow['nodeaggregateidentifier']), + NodeAggregateId::fromString($nodeRow['nodeaggregateid']), OriginDimensionSpacePoint::fromJsonString($nodeRow['origindimensionspacepoint']), NodeAggregateClassification::from($nodeRow['classification']), NodeTypeName::fromString($nodeRow['nodetypename']), @@ -129,7 +129,7 @@ public function mapNodeRowsToNodeAggregate( return null; } - $rawNodeAggregateIdentifier = ''; + $rawNodeAggregateId = ''; $rawNodeTypeName = ''; $rawNodeName = ''; $rawNodeAggregateClassification = ''; @@ -154,7 +154,7 @@ public function mapNodeRowsToNodeAggregate( $visibilityConstraints ); $occupiedDimensionSpacePoints[] = $occupiedDimensionSpacePoint; - $rawNodeAggregateIdentifier = $rawNodeAggregateIdentifier ?: $nodeRow['nodeaggregateidentifier']; + $rawNodeAggregateId = $rawNodeAggregateId ?: $nodeRow['nodeaggregateid']; $rawNodeTypeName = $rawNodeTypeName ?: $nodeRow['nodetypename']; $rawNodeName = $rawNodeName ?: $nodeRow['name']; $rawNodeAggregateClassification = $rawNodeAggregateClassification ?: $nodeRow['classification']; @@ -179,9 +179,9 @@ public function mapNodeRowsToNodeAggregate( /** @var Node $primaryNode a nodeAggregate only exists if it at least contains one node. */ $primaryNode = current($nodesByOccupiedDimensionSpacePoints); - return new \Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate( - $primaryNode->subgraphIdentity->contentStreamIdentifier, - NodeAggregateIdentifier::fromString($rawNodeAggregateIdentifier), + return new NodeAggregate( + $primaryNode->subgraphIdentity->contentStreamId, + NodeAggregateId::fromString($rawNodeAggregateId), NodeAggregateClassification::from($rawNodeAggregateClassification), NodeTypeName::fromString($rawNodeTypeName), $rawNodeName ? NodeName::fromString($rawNodeName) : null, @@ -197,7 +197,7 @@ public function mapNodeRowsToNodeAggregate( /** * @param iterable> $nodeRows - * @return iterable + * @return iterable * @throws NodeTypeNotFoundException */ public function mapNodeRowsToNodeAggregates( @@ -217,80 +217,80 @@ public function mapNodeRowsToNodeAggregates( foreach ($nodeRows as $nodeRow) { // A node can occupy exactly one DSP and cover multiple ones... - $rawNodeAggregateIdentifier = $nodeRow['nodeaggregateidentifier']; + $rawNodeAggregateId = $nodeRow['nodeaggregateid']; $occupiedDimensionSpacePoint = OriginDimensionSpacePoint::fromJsonString( $nodeRow['origindimensionspacepoint'] ); if ( !isset($nodesByOccupiedDimensionSpacePointsByNodeAggregate - [$rawNodeAggregateIdentifier][$occupiedDimensionSpacePoint->hash]) + [$rawNodeAggregateId][$occupiedDimensionSpacePoint->hash]) ) { // ... so we handle occupation exactly once ... $nodesByOccupiedDimensionSpacePointsByNodeAggregate - [$rawNodeAggregateIdentifier][$occupiedDimensionSpacePoint->hash] = $this->mapNodeRowToNode( + [$rawNodeAggregateId][$occupiedDimensionSpacePoint->hash] = $this->mapNodeRowToNode( $nodeRow, $occupiedDimensionSpacePoint->toDimensionSpacePoint(), $visibilityConstraints ); - $occupiedDimensionSpacePointsByNodeAggregate[$rawNodeAggregateIdentifier][] + $occupiedDimensionSpacePointsByNodeAggregate[$rawNodeAggregateId][] = $occupiedDimensionSpacePoint; - $nodeTypeNames[$rawNodeAggregateIdentifier] = $nodeTypeNames[$rawNodeAggregateIdentifier] + $nodeTypeNames[$rawNodeAggregateId] = $nodeTypeNames[$rawNodeAggregateId] ?? NodeTypeName::fromString($nodeRow['nodetypename']); - $nodeNames[$rawNodeAggregateIdentifier] = $nodeNames[$rawNodeAggregateIdentifier] + $nodeNames[$rawNodeAggregateId] = $nodeNames[$rawNodeAggregateId] ?? ($nodeRow['name'] ? NodeName::fromString($nodeRow['name']) : null); - $classificationByNodeAggregate[$rawNodeAggregateIdentifier] - = $classificationByNodeAggregate[$rawNodeAggregateIdentifier] + $classificationByNodeAggregate[$rawNodeAggregateId] + = $classificationByNodeAggregate[$rawNodeAggregateId] ?? NodeAggregateClassification::from($nodeRow['classification']); } // ... and coverage always ... $coveredDimensionSpacePoint = DimensionSpacePoint::fromJsonString( $nodeRow['covereddimensionspacepoint'] ); - $coverageByOccupantsByNodeAggregate[$rawNodeAggregateIdentifier][$occupiedDimensionSpacePoint->hash] + $coverageByOccupantsByNodeAggregate[$rawNodeAggregateId][$occupiedDimensionSpacePoint->hash] [$coveredDimensionSpacePoint->hash] = $coveredDimensionSpacePoint; - $occupationByCoveringByNodeAggregate[$rawNodeAggregateIdentifier][$coveredDimensionSpacePoint->hash] + $occupationByCoveringByNodeAggregate[$rawNodeAggregateId][$coveredDimensionSpacePoint->hash] = $occupiedDimensionSpacePoint; - $coveredDimensionSpacePointsByNodeAggregate[$rawNodeAggregateIdentifier][$coveredDimensionSpacePoint->hash] + $coveredDimensionSpacePointsByNodeAggregate[$rawNodeAggregateId][$coveredDimensionSpacePoint->hash] = $coveredDimensionSpacePoint; $nodesByCoveredDimensionSpacePointsByNodeAggregate - [$rawNodeAggregateIdentifier][$coveredDimensionSpacePoint->hash] + [$rawNodeAggregateId][$coveredDimensionSpacePoint->hash] = $nodesByOccupiedDimensionSpacePointsByNodeAggregate - [$rawNodeAggregateIdentifier][$occupiedDimensionSpacePoint->hash]; + [$rawNodeAggregateId][$occupiedDimensionSpacePoint->hash]; // ... as we do for disabling if (isset($nodeRow['disableddimensionspacepointhash'])) { $disabledDimensionSpacePointsByNodeAggregate - [$rawNodeAggregateIdentifier][$coveredDimensionSpacePoint->hash] = $coveredDimensionSpacePoint; + [$rawNodeAggregateId][$coveredDimensionSpacePoint->hash] = $coveredDimensionSpacePoint; } } - foreach ($nodesByOccupiedDimensionSpacePointsByNodeAggregate as $rawNodeAggregateIdentifier => $nodes) { - /** @var string $rawNodeAggregateIdentifier */ - yield new \Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate( + foreach ($nodesByOccupiedDimensionSpacePointsByNodeAggregate as $rawNodeAggregateId => $nodes) { + /** @var string $rawNodeAggregateId */ + yield new NodeAggregate( // this line is safe because a nodeAggregate only exists if it at least contains one node. - current($nodes)->subgraphIdentity->contentStreamIdentifier, - NodeAggregateIdentifier::fromString($rawNodeAggregateIdentifier), - $classificationByNodeAggregate[$rawNodeAggregateIdentifier], - $nodeTypeNames[$rawNodeAggregateIdentifier], - $nodeNames[$rawNodeAggregateIdentifier], + current($nodes)->subgraphIdentity->contentStreamId, + NodeAggregateId::fromString($rawNodeAggregateId), + $classificationByNodeAggregate[$rawNodeAggregateId], + $nodeTypeNames[$rawNodeAggregateId], + $nodeNames[$rawNodeAggregateId], new OriginDimensionSpacePointSet( - $occupiedDimensionSpacePointsByNodeAggregate[$rawNodeAggregateIdentifier] + $occupiedDimensionSpacePointsByNodeAggregate[$rawNodeAggregateId] ), $nodes, CoverageByOrigin::fromArray( - $coverageByOccupantsByNodeAggregate[$rawNodeAggregateIdentifier] + $coverageByOccupantsByNodeAggregate[$rawNodeAggregateId] ), new DimensionSpacePointSet( - $coveredDimensionSpacePointsByNodeAggregate[$rawNodeAggregateIdentifier] + $coveredDimensionSpacePointsByNodeAggregate[$rawNodeAggregateId] ), $nodesByCoveredDimensionSpacePointsByNodeAggregate - [$rawNodeAggregateIdentifier], + [$rawNodeAggregateId], OriginByCoverage::fromArray( - $occupationByCoveringByNodeAggregate[$rawNodeAggregateIdentifier] + $occupationByCoveringByNodeAggregate[$rawNodeAggregateId] ), new DimensionSpacePointSet( - $disabledDimensionSpacePointsByNodeAggregate[$rawNodeAggregateIdentifier] ?? [] + $disabledDimensionSpacePointsByNodeAggregate[$rawNodeAggregateId] ?? [] ) ); } diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ProjectionContentGraph.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ProjectionContentGraph.php index 8d2d609e646..307990c4ccd 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ProjectionContentGraph.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ProjectionContentGraph.php @@ -22,10 +22,10 @@ use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Projection\NodeRelationAnchorPoint; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; /** @@ -45,32 +45,32 @@ public function __construct( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $childNodeAggregateIdentifier + * @param ContentStreamId $contentStreamId + * @param NodeAggregateId $childNodeAggregateId * @param OriginDimensionSpacePoint $originDimensionSpacePoint * @return NodeRecord|null * @throws DBALException * @throws \Exception */ public function findParentNode( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint ): ?NodeRecord { $params = [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'childNodeAggregateIdentifier' => (string)$childNodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'childNodeAggregateId' => (string)$childNodeAggregateId, 'originDimensionSpacePointHash' => $originDimensionSpacePoint->hash ]; $nodeRow = $this->getDatabaseConnection()->executeQuery( - 'SELECT p.*, ph.contentstreamidentifier, ph.name FROM ' . $this->tableNamePrefix . '_node p + 'SELECT p.*, ph.contentstreamid, ph.name FROM ' . $this->tableNamePrefix . '_node p INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ph ON ph.childnodeanchor = p.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation ch ON ch.parentnodeanchor = p.relationanchorpoint INNER JOIN ' . $this->tableNamePrefix . '_node c ON ch.childnodeanchor = c.relationanchorpoint - WHERE c.nodeaggregateidentifier = :childNodeAggregateIdentifier + WHERE c.nodeaggregateid = :childNodeAggregateId AND c.origindimensionspacepointhash = :originDimensionSpacePointHash - AND ph.contentstreamidentifier = :contentStreamIdentifier - AND ch.contentstreamidentifier = :contentStreamIdentifier + AND ph.contentstreamid = :contentStreamId + AND ch.contentstreamid = :contentStreamId AND ph.dimensionspacepointhash = :originDimensionSpacePointHash AND ch.dimensionspacepointhash = :originDimensionSpacePointHash', $params @@ -80,27 +80,27 @@ public function findParentNode( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param ContentStreamId $contentStreamId + * @param NodeAggregateId $nodeAggregateId * @param DimensionSpacePoint $coveredDimensionSpacePoint * @return NodeRecord|null * @throws DBALException * @throws \Exception */ public function findNodeInAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, DimensionSpacePoint $coveredDimensionSpacePoint ): ?NodeRecord { $nodeRow = $this->getDatabaseConnection()->executeQuery( 'SELECT n.*, h.name FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + WHERE n.nodeaggregateid = :nodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'nodeAggregateId' => (string)$nodeAggregateId, 'dimensionSpacePointHash' => $coveredDimensionSpacePoint->hash ] )->fetchAssociative(); @@ -109,27 +109,27 @@ public function findNodeInAggregate( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param ContentStreamId $contentStreamId + * @param NodeAggregateId $nodeAggregateId * @param OriginDimensionSpacePoint $originDimensionSpacePoint * @return NodeRecord|null * @throws \Exception */ - public function findNodeByIdentifiers( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + public function findNodeByIds( + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint ): ?NodeRecord { $nodeRow = $this->getDatabaseConnection()->executeQuery( 'SELECT n.*, h.name FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier + WHERE n.nodeaggregateid = :nodeAggregateId AND n.origindimensionspacepointhash = :originDimensionSpacePointHash - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :originDimensionSpacePointHash', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, + 'contentStreamId' => (string)$contentStreamId, + 'nodeAggregateId' => (string)$nodeAggregateId, 'originDimensionSpacePointHash' => $originDimensionSpacePoint->hash ] )->fetchAssociative(); @@ -138,27 +138,27 @@ public function findNodeByIdentifiers( } /** - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateId * @param OriginDimensionSpacePoint $originDimensionSpacePoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @return NodeRelationAnchorPoint|null * @throws DBALException */ public function getAnchorPointForNodeAndOriginDimensionSpacePointAndContentStream( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint, - ContentStreamIdentifier $contentStreamIdentifier + ContentStreamId $contentStreamId ): ?NodeRelationAnchorPoint { $rows = $this->getDatabaseConnection()->executeQuery( 'SELECT DISTINCT n.relationanchorpoint FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier + WHERE n.nodeaggregateid = :nodeAggregateId AND n.origindimensionspacepointhash = :originDimensionSpacePointHash - AND h.contentstreamidentifier = :contentStreamIdentifier', + AND h.contentstreamid = :contentStreamId', [ - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, + 'nodeAggregateId' => (string)$nodeAggregateId, 'originDimensionSpacePointHash' => $originDimensionSpacePoint->hash, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, ] )->fetchAllAssociative(); @@ -176,23 +176,23 @@ public function getAnchorPointForNodeAndOriginDimensionSpacePointAndContentStrea } /** - * @param NodeAggregateIdentifier $nodeAggregateIdentifier - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param NodeAggregateId $nodeAggregateId + * @param ContentStreamId $contentStreamId * @return NodeRelationAnchorPoint[] * @throws DBALException */ public function getAnchorPointsForNodeAggregateInContentStream( - NodeAggregateIdentifier $nodeAggregateIdentifier, - ContentStreamIdentifier $contentStreamIdentifier + NodeAggregateId $nodeAggregateId, + ContentStreamId $contentStreamId ): iterable { $rows = $this->getDatabaseConnection()->executeQuery( 'SELECT DISTINCT n.relationanchorpoint FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h ON h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier', + WHERE n.nodeaggregateid = :nodeAggregateId + AND h.contentstreamid = :contentStreamId', [ - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'nodeAggregateId' => (string)$nodeAggregateId, + 'contentStreamId' => (string)$contentStreamId, ] )->fetchAllAssociative(); @@ -224,7 +224,7 @@ public function getNodeByAnchorPoint(NodeRelationAnchorPoint $nodeRelationAnchor * @param NodeRelationAnchorPoint|null $parentAnchorPoint * @param NodeRelationAnchorPoint|null $childAnchorPoint * @param NodeRelationAnchorPoint|null $succeedingSiblingAnchorPoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePoint $dimensionSpacePoint * @return int * @throws DBALException @@ -233,7 +233,7 @@ public function determineHierarchyRelationPosition( ?NodeRelationAnchorPoint $parentAnchorPoint, ?NodeRelationAnchorPoint $childAnchorPoint, ?NodeRelationAnchorPoint $succeedingSiblingAnchorPoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint ): int { if (!$parentAnchorPoint && !$childAnchorPoint) { @@ -247,11 +247,11 @@ public function determineHierarchyRelationPosition( $succeedingSiblingRelation = $this->getDatabaseConnection()->executeQuery( 'SELECT h.* FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.childnodeanchor = :succeedingSiblingAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash', [ 'succeedingSiblingAnchorPoint' => (string)$succeedingSiblingAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAssociative(); @@ -262,12 +262,12 @@ public function determineHierarchyRelationPosition( $precedingSiblingData = $this->getDatabaseConnection()->executeQuery( 'SELECT MAX(h.position) AS position FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.parentnodeanchor = :anchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash AND h.position < :position', [ 'anchorPoint' => $parentAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, 'position' => $succeedingSiblingPosition ] @@ -288,11 +288,11 @@ public function determineHierarchyRelationPosition( $childHierarchyRelationData = $this->getDatabaseConnection()->executeQuery( 'SELECT h.parentnodeanchor FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.childnodeanchor = :childAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash', [ 'childAnchorPoint' => $childAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAssociative(); @@ -303,11 +303,11 @@ public function determineHierarchyRelationPosition( $rightmostSucceedingSiblingRelationData = $this->getDatabaseConnection()->executeQuery( 'SELECT MAX(h.position) AS position FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.parentnodeanchor = :parentAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash', [ 'parentAnchorPoint' => $parentAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAssociative(); @@ -325,14 +325,14 @@ public function determineHierarchyRelationPosition( /** * @param NodeRelationAnchorPoint $parentAnchorPoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePoint $dimensionSpacePoint * @return HierarchyRelation[] * @throws DBALException */ public function getOutgoingHierarchyRelationsForNodeAndSubgraph( NodeRelationAnchorPoint $parentAnchorPoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint ): array { $relations = []; @@ -340,11 +340,11 @@ public function getOutgoingHierarchyRelationsForNodeAndSubgraph( $this->getDatabaseConnection()->executeQuery( 'SELECT h.* FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.parentnodeanchor = :parentAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash', [ 'parentAnchorPoint' => (string)$parentAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAllAssociative() as $relationData @@ -357,14 +357,14 @@ public function getOutgoingHierarchyRelationsForNodeAndSubgraph( /** * @param NodeRelationAnchorPoint $childAnchorPoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePoint $dimensionSpacePoint * @return HierarchyRelation[] * @throws DBALException */ public function getIngoingHierarchyRelationsForNodeAndSubgraph( NodeRelationAnchorPoint $childAnchorPoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint ): array { $relations = []; @@ -372,11 +372,11 @@ public function getIngoingHierarchyRelationsForNodeAndSubgraph( $this->getDatabaseConnection()->executeQuery( 'SELECT h.* FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.childnodeanchor = :childAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash = :dimensionSpacePointHash', [ 'childAnchorPoint' => (string)$childAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash ] )->fetchAllAssociative() as $relationData @@ -389,23 +389,23 @@ public function getIngoingHierarchyRelationsForNodeAndSubgraph( /** * @param NodeRelationAnchorPoint $childAnchorPoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePointSet|null $restrictToSet * @return HierarchyRelation[] * @throws DBALException */ public function findIngoingHierarchyRelationsForNode( NodeRelationAnchorPoint $childAnchorPoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePointSet $restrictToSet = null ): array { $relations = []; $query = 'SELECT h.* FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.childnodeanchor = :childAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier'; + AND h.contentstreamid = :contentStreamId'; $parameters = [ 'childAnchorPoint' => (string)$childAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier + 'contentStreamId' => (string)$contentStreamId ]; $types = []; @@ -427,23 +427,23 @@ public function findIngoingHierarchyRelationsForNode( /** * @param NodeRelationAnchorPoint $parentAnchorPoint - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param DimensionSpacePointSet|null $restrictToSet * @return HierarchyRelation[] * @throws DBALException */ public function findOutgoingHierarchyRelationsForNode( NodeRelationAnchorPoint $parentAnchorPoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePointSet $restrictToSet = null ): array { $relations = []; $query = 'SELECT h.* FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.parentnodeanchor = :parentAnchorPoint - AND h.contentstreamidentifier = :contentStreamIdentifier'; + AND h.contentstreamid = :contentStreamId'; $parameters = [ 'parentAnchorPoint' => (string)$parentAnchorPoint, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier + 'contentStreamId' => (string)$contentStreamId ]; $types = []; @@ -464,15 +464,15 @@ public function findOutgoingHierarchyRelationsForNode( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param ContentStreamId $contentStreamId + * @param NodeAggregateId $nodeAggregateId * @param DimensionSpacePointSet $dimensionSpacePointSet * @return array|HierarchyRelation[] * @throws DBALException */ public function findOutgoingHierarchyRelationsForNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, DimensionSpacePointSet $dimensionSpacePointSet ): array { $relations = []; @@ -480,12 +480,12 @@ public function findOutgoingHierarchyRelationsForNodeAggregate( $this->getDatabaseConnection()->executeQuery( 'SELECT h.* FROM ' . $this->tableNamePrefix . '_hierarchyrelation h INNER JOIN ' . $this->tableNamePrefix . '_node n ON h.parentnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + WHERE n.nodeaggregateid = :nodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash IN (:dimensionSpacePointHashes)', [ - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'nodeAggregateId' => (string)$nodeAggregateId, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHashes' => $dimensionSpacePointSet->getPointHashes() ], [ @@ -500,26 +500,26 @@ public function findOutgoingHierarchyRelationsForNodeAggregate( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param ContentStreamId $contentStreamId + * @param NodeAggregateId $nodeAggregateId * @param DimensionSpacePointSet|null $dimensionSpacePointSet * @return array|HierarchyRelation[] * @throws DBALException */ public function findIngoingHierarchyRelationsForNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, DimensionSpacePointSet $dimensionSpacePointSet = null ): array { $relations = []; $query = 'SELECT h.* FROM ' . $this->tableNamePrefix . '_hierarchyrelation h INNER JOIN ' . $this->tableNamePrefix . '_node n ON h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :nodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier'; + WHERE n.nodeaggregateid = :nodeAggregateId + AND h.contentstreamid = :contentStreamId'; $parameters = [ - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'nodeAggregateId' => (string)$nodeAggregateId, + 'contentStreamId' => (string)$contentStreamId, ]; $types = []; @@ -541,16 +541,16 @@ public function findIngoingHierarchyRelationsForNodeAggregate( } /** - * @return array + * @return array * @throws \Doctrine\DBAL\Driver\Exception|\Doctrine\DBAL\Exception */ - public function getAllContentStreamIdentifiersAnchorPointIsContainedIn( + public function getAllContentStreamIdsAnchorPointIsContainedIn( NodeRelationAnchorPoint $nodeRelationAnchorPoint ): array { - $contentStreamIdentifiers = []; + $contentStreamIds = []; foreach ( $this->getDatabaseConnection()->executeQuery( - 'SELECT DISTINCT h.contentstreamidentifier + 'SELECT DISTINCT h.contentstreamid FROM ' . $this->tableNamePrefix . '_hierarchyrelation h WHERE h.childnodeanchor = :nodeRelationAnchorPoint', [ @@ -558,44 +558,44 @@ public function getAllContentStreamIdentifiersAnchorPointIsContainedIn( ] )->fetchAllAssociative() as $row ) { - $contentStreamIdentifiers[] = ContentStreamIdentifier::fromString($row['contentstreamidentifier']); + $contentStreamIds[] = ContentStreamId::fromString($row['contentstreamid']); } - return $contentStreamIdentifiers; + return $contentStreamIds; } /** - * Finds all descendant node aggregate identifiers, indexed by dimension space point hash + * Finds all descendant node aggregate ids, indexed by dimension space point hash * - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $entryNodeAggregateIdentifier + * @param ContentStreamId $contentStreamId + * @param NodeAggregateId $entryNodeAggregateId * @param DimensionSpacePointSet $affectedDimensionSpacePoints - * @return array|NodeAggregateIdentifier[][] + * @return array|NodeAggregateId[][] * @throws DBALException */ - public function findDescendantNodeAggregateIdentifiers( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $entryNodeAggregateIdentifier, + public function findDescendantNodeAggregateIds( + ContentStreamId $contentStreamId, + NodeAggregateId $entryNodeAggregateId, DimensionSpacePointSet $affectedDimensionSpacePoints ): array { $rows = $this->getDatabaseConnection()->executeQuery( ' - -- ProjectionContentGraph::findDescendantNodeAggregateIdentifiers + -- ProjectionContentGraph::findDescendantNodeAggregateIds WITH RECURSIVE nestedNodes AS ( -- -------------------------------- -- INITIAL query: select the root nodes -- -------------------------------- SELECT - n.nodeaggregateidentifier, + n.nodeaggregateid, n.relationanchorpoint, h.dimensionspacepointhash FROM ' . $this->tableNamePrefix . '_node n INNER JOIN ' . $this->tableNamePrefix . '_hierarchyrelation h on h.childnodeanchor = n.relationanchorpoint - WHERE n.nodeaggregateidentifier = :entryNodeAggregateIdentifier - AND h.contentstreamidentifier = :contentStreamIdentifier + WHERE n.nodeaggregateid = :entryNodeAggregateId + AND h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash IN (:affectedDimensionSpacePointHashes) UNION @@ -603,7 +603,7 @@ public function findDescendantNodeAggregateIdentifiers( -- RECURSIVE query: do one "child" query step -- -------------------------------- SELECT - c.nodeaggregateidentifier, + c.nodeaggregateid, c.relationanchorpoint, h.dimensionspacepointhash FROM @@ -613,14 +613,14 @@ public function findDescendantNodeAggregateIdentifiers( INNER JOIN ' . $this->tableNamePrefix . '_node c on h.childnodeanchor = c.relationanchorpoint WHERE - h.contentstreamidentifier = :contentStreamIdentifier + h.contentstreamid = :contentStreamId AND h.dimensionspacepointhash IN (:affectedDimensionSpacePointHashes) ) - select nodeaggregateidentifier, dimensionspacepointhash from nestedNodes + select nodeaggregateid, dimensionspacepointhash from nestedNodes ', [ - 'entryNodeAggregateIdentifier' => (string)$entryNodeAggregateIdentifier, - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'entryNodeAggregateId' => (string)$entryNodeAggregateId, + 'contentStreamId' => (string)$contentStreamId, 'affectedDimensionSpacePointHashes' => $affectedDimensionSpacePoints->getPointHashes() ], [ @@ -628,13 +628,13 @@ public function findDescendantNodeAggregateIdentifiers( ] )->fetchAllAssociative(); - $nodeAggregateIdentifiers = []; + $nodeAggregateIds = []; foreach ($rows as $row) { - $nodeAggregateIdentifiers[$row['nodeaggregateidentifier']][$row['dimensionspacepointhash']] - = NodeAggregateIdentifier::fromString($row['nodeaggregateidentifier']); + $nodeAggregateIds[$row['nodeaggregateid']][$row['dimensionspacepointhash']] + = NodeAggregateId::fromString($row['nodeaggregateid']); } - return $nodeAggregateIdentifiers; + return $nodeAggregateIds; } /** @@ -646,7 +646,7 @@ protected function mapRawDataToHierarchyRelation(array $rawData): HierarchyRelat NodeRelationAnchorPoint::fromString($rawData['parentnodeanchor']), NodeRelationAnchorPoint::fromString($rawData['childnodeanchor']), $rawData['name'] ? NodeName::fromString($rawData['name']) : null, - ContentStreamIdentifier::fromString($rawData['contentstreamidentifier']), + ContentStreamId::fromString($rawData['contentstreamid']), DimensionSpacePoint::fromJsonString($rawData['dimensionspacepoint']), $rawData['dimensionspacepointhash'], (int)$rawData['position'] diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/ContentStreamForking.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/ContentStreamForking.php index 7675f8a666f..d05cb11b76d 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/ContentStreamForking.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/ContentStreamForking.php @@ -33,8 +33,8 @@ private function whenContentStreamWasForked(ContentStreamWasForked $event): void { $this->transactional(function () use ($event) { $parameters = [ - 'sourceContentStreamIdentifier' => (string)$event->sourceContentStreamIdentifier, - 'targetContentStreamIdentifier' => (string)$event->newContentStreamIdentifier + 'sourceContentStreamIdentifier' => (string)$event->sourceContentStreamId, + 'targetContentStreamIdentifier' => (string)$event->newContentStreamId ]; $this->getDatabaseConnection()->executeQuery(/** @lang PostgreSQL */ diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/CopyOnWrite.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/CopyOnWrite.php index 3f26d81ee86..6954d81c937 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/CopyOnWrite.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/CopyOnWrite.php @@ -18,7 +18,7 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\NodeRecord; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\NodeRelationAnchorPoint; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\ProjectionHypergraph; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * The copy on write feature set for the hypergraph projector @@ -31,7 +31,7 @@ trait CopyOnWrite * @throws \Throwable */ public function copyOnWrite( - ContentStreamIdentifier $originContentStreamIdentifier, + ContentStreamId $originContentStreamIdentifier, NodeRecord $originNode, callable $preprocessor ): NodeRelationAnchorPoint { @@ -76,7 +76,7 @@ public function copyOnWrite( * @throws \Doctrine\DBAL\Exception */ private function reassignIngoingHierarchyRelations( - ContentStreamIdentifier $originContentStreamIdentifier, + ContentStreamId $originContentStreamIdentifier, NodeRelationAnchorPoint $originRelationAnchorPoint, NodeRelationAnchorPoint $targetRelationAnchorPoint ): void { @@ -99,7 +99,7 @@ private function reassignIngoingHierarchyRelations( * @throws \Doctrine\DBAL\Exception */ private function reassignOutgoingHierarchyRelations( - ContentStreamIdentifier $originContentStreamIdentifier, + ContentStreamId $originContentStreamIdentifier, NodeRelationAnchorPoint $originRelationAnchorPoint, NodeRelationAnchorPoint $targetRelationAnchorPoint ): void { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeCreation.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeCreation.php index c2a931b389a..173e51bf4e6 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeCreation.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeCreation.php @@ -24,8 +24,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\ProjectionHypergraph; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeCreation\Event\NodeAggregateWithNodeWasCreated; use Neos\ContentRepository\Core\Feature\RootNodeCreation\Event\RootNodeAggregateWithNodeWasCreated; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; @@ -48,7 +48,7 @@ private function whenRootNodeAggregateWithNodeWasCreated(RootNodeAggregateWithNo $node = new NodeRecord( $nodeRelationAnchorPoint, - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $originDimensionSpacePoint, $originDimensionSpacePoint->hash, SerializedPropertyValues::fromArray([]), @@ -60,7 +60,7 @@ private function whenRootNodeAggregateWithNodeWasCreated(RootNodeAggregateWithNo $this->transactional(function () use ($node, $event) { $node->addToDatabase($this->getDatabaseConnection(), $this->tableNamePrefix); $this->connectToHierarchy( - $event->contentStreamIdentifier, + $event->contentStreamId, NodeRelationAnchorPoint::forRootHierarchyRelation(), $node->relationAnchorPoint, $event->coveredDimensionSpacePoints, @@ -78,7 +78,7 @@ public function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCrea $nodeRelationAnchorPoint = NodeRelationAnchorPoint::create(); $node = new NodeRecord( $nodeRelationAnchorPoint, - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $event->originDimensionSpacePoint, $event->originDimensionSpacePoint->hash, $event->initialPropertyValues, @@ -91,17 +91,17 @@ public function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCrea $node->addToDatabase($this->getDatabaseConnection(), $this->tableNamePrefix); foreach ($event->coveredDimensionSpacePoints as $dimensionSpacePoint) { $hierarchyRelation = $this->getProjectionHypergraph()->findChildHierarchyHyperrelationRecord( - $event->contentStreamIdentifier, + $event->contentStreamId, $dimensionSpacePoint, - $event->parentNodeAggregateIdentifier + $event->parentNodeAggregateId ); if ($hierarchyRelation) { $succeedingSiblingNodeAnchor = null; - if ($event->succeedingNodeAggregateIdentifier) { + if ($event->succeedingNodeAggregateId) { $succeedingSiblingNode = $this->getProjectionHypergraph()->findNodeRecordByCoverage( - $event->contentStreamIdentifier, + $event->contentStreamId, $dimensionSpacePoint, - $event->succeedingNodeAggregateIdentifier + $event->succeedingNodeAggregateId ); if ($succeedingSiblingNode) { $succeedingSiblingNodeAnchor = $succeedingSiblingNode->relationAnchorPoint; @@ -115,9 +115,9 @@ public function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCrea ); } else { $parentNode = $this->getProjectionHypergraph()->findNodeRecordByCoverage( - $event->contentStreamIdentifier, + $event->contentStreamId, $dimensionSpacePoint, - $event->parentNodeAggregateIdentifier + $event->parentNodeAggregateId ); if (is_null($parentNode)) { throw EventCouldNotBeAppliedToContentGraph::becauseTheTargetParentNodeIsMissing( @@ -125,7 +125,7 @@ public function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCrea ); } $hierarchyRelation = new HierarchyHyperrelationRecord( - $event->contentStreamIdentifier, + $event->contentStreamId, $parentNode->relationAnchorPoint, $dimensionSpacePoint, NodeRelationAnchorPoints::fromArray([$node->relationAnchorPoint]) @@ -133,10 +133,10 @@ public function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCrea $hierarchyRelation->addToDatabase($this->getDatabaseConnection(), $this->tableNamePrefix); } $this->connectToRestrictionRelations( - $event->contentStreamIdentifier, + $event->contentStreamId, $dimensionSpacePoint, - $event->parentNodeAggregateIdentifier, - $event->nodeAggregateIdentifier + $event->parentNodeAggregateId, + $event->nodeAggregateId ); } }); @@ -147,7 +147,7 @@ public function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCrea * @throws \Doctrine\DBAL\Driver\Exception */ protected function connectToHierarchy( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, NodeRelationAnchorPoint $parentNodeAnchor, NodeRelationAnchorPoint $childNodeAnchor, DimensionSpacePointSet $dimensionSpacePointSet, @@ -183,10 +183,10 @@ protected function connectToHierarchy( * @throws \Doctrine\DBAL\Driver\Exception */ protected function connectToRestrictionRelations( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, - NodeAggregateIdentifier $affectedNodeAggregateIdentifier + NodeAggregateId $parentNodeAggregateIdentifier, + NodeAggregateId $affectedNodeAggregateIdentifier ): void { foreach ( $this->getProjectionHypergraph()->findIngoingRestrictionRelations( diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeDisabling.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeDisabling.php index d8e01fab75c..4abd57fb27e 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeDisabling.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeDisabling.php @@ -35,18 +35,18 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): $this->transactional(function () use ($event) { $descendantNodeAggregateIdentifiersByAffectedDimensionSpacePoint = $this->getProjectionHypergraph()->findDescendantNodeAggregateIdentifiers( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->affectedDimensionSpacePoints, - $event->nodeAggregateIdentifier + $event->nodeAggregateId ); /** @codingStandardsIgnoreStart */ foreach ($descendantNodeAggregateIdentifiersByAffectedDimensionSpacePoint as $dimensionSpacePointHash => $descendantNodeAggregateIdentifiers) { /** @codingStandardsIgnoreEnd */ $restrictionRelation = new RestrictionHyperrelationRecord( - $event->contentStreamIdentifier, + $event->contentStreamId, $dimensionSpacePointHash, - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $descendantNodeAggregateIdentifiers ); @@ -62,9 +62,9 @@ private function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): vo { $this->transactional(function () use ($event) { $restrictionRelations = $this->getProjectionHypergraph()->findOutgoingRestrictionRelations( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->affectedDimensionSpacePoints, - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, ); foreach ($restrictionRelations as $restrictionRelation) { $restrictionRelation->removeFromDatabase($this->getDatabaseConnection(), $this->tableNamePrefix); diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeModification.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeModification.php index 988130eacae..a1f187693a8 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeModification.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeModification.php @@ -36,15 +36,15 @@ private function whenNodePropertiesWereSet(NodePropertiesWereSet $event): void { $this->transactional(function () use ($event) { $nodeRecord = $this->getProjectionHypergraph()->findNodeRecordByOrigin( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->originDimensionSpacePoint, - $event->nodeAggregateIdentifier + $event->nodeAggregateId ); if (is_null($nodeRecord)) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceNodeIsMissing(get_class($event)); } $this->copyOnWrite( - $event->contentStreamIdentifier, + $event->contentStreamId, $nodeRecord, function (NodeRecord $node) use ($event) { $node->properties = $node->properties->merge($event->propertyValues); diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeReferencing.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeReferencing.php index 991af03c5f1..755cfc3caaf 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeReferencing.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeReferencing.php @@ -38,14 +38,14 @@ private function whenNodeReferencesWereSet(NodeReferencesWereSet $event): void $this->transactional(function () use ($event) { foreach ($event->affectedSourceOriginDimensionSpacePoints as $originDimensionSpacePoint) { $nodeRecord = $this->getProjectionHypergraph()->findNodeRecordByOrigin( - $event->contentStreamIdentifier, + $event->contentStreamId, $originDimensionSpacePoint, - $event->sourceNodeAggregateIdentifier + $event->sourceNodeAggregateId ); if ($nodeRecord) { $anchorPoint = $this->copyOnWrite( - $event->contentStreamIdentifier, + $event->contentStreamId, $nodeRecord, function (NodeRecord $node) { } @@ -65,7 +65,7 @@ function (NodeRecord $node) { $event->referenceName, $position, $reference->properties, - $reference->targetNodeAggregateIdentifier + $reference->targetNodeAggregateId ); $referenceRecord->addToDatabase($this->getDatabaseConnection(), $this->tableNamePrefix); $position++; diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRemoval.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRemoval.php index f509dd3a1d4..0a1f5255336 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRemoval.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRemoval.php @@ -22,8 +22,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\ProjectionHypergraph; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\ReferenceRelationRecord; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeRemoval\Event\NodeAggregateWasRemoved; /** @@ -43,9 +43,9 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo // first step: remove hierarchy relations foreach ($event->affectedCoveredDimensionSpacePoints as $dimensionSpacePoint) { $nodeRecord = $this->getProjectionHypergraph()->findNodeRecordByCoverage( - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $dimensionSpacePoint, - $event->getNodeAggregateIdentifier() + $event->getNodeAggregateId() ); if (is_null($nodeRecord)) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceNodeIsMissing(get_class($event)); @@ -54,7 +54,7 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo /** @var HierarchyHyperrelationRecord $ingoingHierarchyRelation */ $ingoingHierarchyRelation = $this->getProjectionHypergraph() ->findHierarchyHyperrelationRecordByChildNodeAnchor( - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $dimensionSpacePoint, $nodeRecord->relationAnchorPoint ); @@ -64,15 +64,15 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo $this->tableNamePrefix ); $this->removeFromRestrictions( - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $dimensionSpacePoint, - $event->getNodeAggregateIdentifier() + $event->getNodeAggregateId() ); $affectedRelationAnchorPoints[] = $nodeRecord->relationAnchorPoint; $this->cascadeHierarchy( - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $dimensionSpacePoint, $nodeRecord->relationAnchorPoint, $affectedRelationAnchorPoints @@ -113,7 +113,7 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo * @param array &$affectedRelationAnchorPoints */ private function cascadeHierarchy( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, NodeRelationAnchorPoint $nodeRelationAnchorPoint, array &$affectedRelationAnchorPoints @@ -156,16 +156,16 @@ private function cascadeHierarchy( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamIdentifier * @param DimensionSpacePoint $dimensionSpacePoint - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateIdentifier * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception */ private function removeFromRestrictions( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateIdentifier ): void { foreach ( $this->getProjectionHypergraph()->findIngoingRestrictionRelations( diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRenaming.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRenaming.php index 611defe6a0d..ecb405421ac 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRenaming.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeRenaming.php @@ -36,12 +36,12 @@ private function whenNodeAggregateNameWasChanged(NodeAggregateNameWasChanged $ev $this->transactional(function () use ($event) { foreach ( $this->getProjectionHyperGraph()->findNodeRecordsForNodeAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier + $event->contentStreamId, + $event->nodeAggregateId ) as $originNode ) { $this->copyOnWrite( - $event->contentStreamIdentifier, + $event->contentStreamId, $originNode, function (NodeRecord $nodeRecord) use ($event) { $nodeRecord->nodeName = $event->newNodeName; diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeTypeChange.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeTypeChange.php index e4563697193..2015342883e 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeTypeChange.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeTypeChange.php @@ -36,12 +36,12 @@ private function whenNodeAggregateTypeWasChanged(NodeAggregateTypeWasChanged $ev $this->transactional(function () use ($event) { foreach ( $this->getProjectionHyperGraph()->findNodeRecordsForNodeAggregate( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier + $event->contentStreamId, + $event->nodeAggregateId ) as $originNode ) { $this->copyOnWrite( - $event->contentStreamIdentifier, + $event->contentStreamId, $originNode, function (NodeRecord $nodeRecord) use ($event) { $nodeRecord->nodeTypeName = $event->newNodeTypeName; diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeVariation.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeVariation.php index 2e7d437027f..91f078aebf5 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeVariation.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Feature/NodeVariation.php @@ -23,8 +23,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\ProjectionHypergraph; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\ReferenceRelationRecord; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodeGeneralizationVariantWasCreated; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodePeerVariantWasCreated; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodeSpecializationVariantWasCreated; @@ -50,9 +50,9 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria { $this->transactional(function () use ($event) { $sourceNode = $this->getProjectionHyperGraph()->findNodeRecordByOrigin( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->sourceOrigin, - $event->nodeAggregateIdentifier + $event->nodeAggregateId ); if (is_null($sourceNode)) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceNodeIsMissing((get_class($event))); @@ -63,19 +63,19 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria ); $oldCoveringNode = $this->projectionHypergraph->findNodeRecordByCoverage( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->specializationOrigin->toDimensionSpacePoint(), - $event->nodeAggregateIdentifier + $event->nodeAggregateId ); if ($oldCoveringNode instanceof NodeRecord) { $this->assignNewChildNodeToAffectedHierarchyRelations( - $event->contentStreamIdentifier, + $event->contentStreamId, $oldCoveringNode->relationAnchorPoint, $specializedNode->relationAnchorPoint, $event->specializationCoverage ); $this->assignNewParentNodeToAffectedHierarchyRelations( - $event->contentStreamIdentifier, + $event->contentStreamId, $oldCoveringNode->relationAnchorPoint, $specializedNode->relationAnchorPoint, $event->specializationCoverage @@ -84,9 +84,9 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria // the dimension space point is not yet covered by the node aggregate, // but it is known that the source's parent node aggregate does $sourceParent = $this->projectionHypergraph->findParentNodeRecordByOrigin( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->sourceOrigin, - $event->nodeAggregateIdentifier + $event->nodeAggregateId ); if (is_null($sourceParent)) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceParentNodeIsMissing( @@ -95,7 +95,7 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria } foreach ($event->specializationCoverage as $specializedDimensionSpacePoint) { $parentNode = $this->projectionHypergraph->findNodeRecordByCoverage( - $event->contentStreamIdentifier, + $event->contentStreamId, $specializedDimensionSpacePoint, $sourceParent->nodeAggregateIdentifier ); @@ -105,7 +105,7 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria ); } $parentRelation = $this->projectionHypergraph->findHierarchyHyperrelationRecordByParentNodeAnchor( - $event->contentStreamIdentifier, + $event->contentStreamId, $specializedDimensionSpacePoint, $parentNode->relationAnchorPoint ); @@ -135,9 +135,9 @@ private function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVaria { $this->transactional(function () use ($event) { $sourceNode = $this->getProjectionHyperGraph()->findNodeRecordByOrigin( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->sourceOrigin, - $event->nodeAggregateIdentifier + $event->nodeAggregateId ); if (!$sourceNode) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceNodeIsMissing(get_class($event)); @@ -148,14 +148,14 @@ private function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVaria ); $this->replaceNodeRelationAnchorPoint( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->generalizationCoverage, $generalizedNode->relationAnchorPoint ); $this->addMissingHierarchyRelations( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin, $generalizedNode->relationAnchorPoint, $event->generalizationCoverage, @@ -172,9 +172,9 @@ private function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event) { $this->transactional(function () use ($event) { $sourceNode = $this->getProjectionHyperGraph()->findNodeRecordByOrigin( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->sourceOrigin, - $event->nodeAggregateIdentifier + $event->nodeAggregateId ); if (!$sourceNode) { throw EventCouldNotBeAppliedToContentGraph::becauseTheSourceNodeIsMissing(get_class($event)); @@ -185,14 +185,14 @@ private function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event) ); $this->replaceNodeRelationAnchorPoint( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->peerCoverage, $peerNode->relationAnchorPoint ); $this->addMissingHierarchyRelations( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->sourceOrigin, $peerNode->relationAnchorPoint, $event->peerCoverage, @@ -231,8 +231,8 @@ protected function copyNodeToOriginDimensionSpacePoint( * @throws \Doctrine\DBAL\Exception */ protected function replaceNodeRelationAnchorPoint( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $affectedNodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $affectedNodeAggregateIdentifier, DimensionSpacePointSet $affectedDimensionSpacePointSet, NodeRelationAnchorPoint $newNodeRelationAnchorPoint ): void { @@ -278,8 +278,8 @@ protected function replaceNodeRelationAnchorPoint( } protected function addMissingHierarchyRelations( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier, OriginDimensionSpacePoint $sourceOrigin, NodeRelationAnchorPoint $targetRelationAnchor, DimensionSpacePointSet $coverage, @@ -358,7 +358,7 @@ protected function addMissingHierarchyRelations( * @throws \Doctrine\DBAL\Exception */ protected function assignNewChildNodeToAffectedHierarchyRelations( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, NodeRelationAnchorPoint $oldChildAnchor, NodeRelationAnchorPoint $newChildAnchor, DimensionSpacePointSet $affectedDimensionSpacePoints @@ -383,7 +383,7 @@ protected function assignNewChildNodeToAffectedHierarchyRelations( * @throws \Doctrine\DBAL\Exception */ protected function assignNewParentNodeToAffectedHierarchyRelations( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, NodeRelationAnchorPoint $oldParentAnchor, NodeRelationAnchorPoint $newParentAnchor, DimensionSpacePointSet $affectedDimensionSpacePoints diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HierarchyHyperrelationRecord.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HierarchyHyperrelationRecord.php index 44423976bef..393b1f7f39a 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HierarchyHyperrelationRecord.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HierarchyHyperrelationRecord.php @@ -17,7 +17,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception as DBALException; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * The active record for reading and writing hierarchy hyperrelations from and to the database @@ -26,7 +26,7 @@ */ final class HierarchyHyperrelationRecord { - public ContentStreamIdentifier $contentStreamIdentifier; + public ContentStreamId $contentStreamIdentifier; public DimensionSpacePoint $dimensionSpacePoint; @@ -38,7 +38,7 @@ final class HierarchyHyperrelationRecord public NodeRelationAnchorPoints $childNodeAnchors; public function __construct( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, NodeRelationAnchorPoint $parentNodeAnchor, DimensionSpacePoint $dimensionSpacePoint, NodeRelationAnchorPoints $childNodeAnchorPoints @@ -55,7 +55,7 @@ public function __construct( public static function fromDatabaseRow(array $databaseRow): self { return new self( - ContentStreamIdentifier::fromString($databaseRow['contentstreamidentifier']), + ContentStreamId::fromString($databaseRow['contentstreamidentifier']), NodeRelationAnchorPoint::fromString($databaseRow['parentnodeanchor']), DimensionSpacePoint::fromJsonString($databaseRow['dimensionspacepoint']), NodeRelationAnchorPoints::fromDatabaseString( diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeAggregateIdentifiers.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeAggregateIdentifiers.php index a2b9a5ff6f6..eb245378c96 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeAggregateIdentifiers.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeAggregateIdentifiers.php @@ -14,8 +14,8 @@ namespace Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds as NodeAggregateIdentifierCollection; /** @@ -26,12 +26,12 @@ final class NodeAggregateIdentifiers { /** - * @var array + * @var array */ private array $identifiers; /** - * @param array $identifiers + * @param array $identifiers */ private function __construct(array $identifiers) { @@ -39,20 +39,20 @@ private function __construct(array $identifiers) } /** - * @param array $array + * @param array $array */ public static function fromArray(array $array): self { $values = []; foreach ($array as $item) { if (is_string($item)) { - $values[$item] = NodeAggregateIdentifier::fromString($item); - } elseif ($item instanceof NodeAggregateIdentifier) { + $values[$item] = NodeAggregateId::fromString($item); + } elseif ($item instanceof NodeAggregateId) { $values[(string)$item] = $item; } else { throw new \InvalidArgumentException( 'NodeAggregateIdentifiers can only consist of ' - . NodeAggregateIdentifier::class . ' objects.', + . NodeAggregateId::class . ' objects.', 1616841637 ); } @@ -80,8 +80,8 @@ public function toDatabaseString(): string } public function add( - NodeAggregateIdentifier $nodeAggregateIdentifier, - ?NodeAggregateIdentifier $succeedingSibling = null + NodeAggregateId $nodeAggregateIdentifier, + ?NodeAggregateId $succeedingSibling = null ): self { $nodeAggregateIdentifiers = $this->identifiers; if ($succeedingSibling) { @@ -94,7 +94,7 @@ public function add( return new self($nodeAggregateIdentifiers); } - public function remove(NodeAggregateIdentifier $nodeAggregateIdentifier): self + public function remove(NodeAggregateId $nodeAggregateIdentifier): self { $identifiers = $this->identifiers; if (isset($identifiers[(string) $nodeAggregateIdentifier])) { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeRecord.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeRecord.php index ddf697463c4..c18a034752d 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeRecord.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/NodeRecord.php @@ -17,7 +17,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception as DBALException; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; @@ -32,7 +32,7 @@ final class NodeRecord { public NodeRelationAnchorPoint $relationAnchorPoint; - public NodeAggregateIdentifier $nodeAggregateIdentifier; + public NodeAggregateId $nodeAggregateIdentifier; public OriginDimensionSpacePoint $originDimensionSpacePoint; @@ -48,7 +48,7 @@ final class NodeRecord public function __construct( NodeRelationAnchorPoint $relationAnchorPoint, - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint, string $originDimensionSpacePointHash, SerializedPropertyValues $properties, @@ -74,7 +74,7 @@ public static function fromDatabaseRow(array $databaseRow): self { return new self( NodeRelationAnchorPoint::fromString($databaseRow['relationanchorpoint']), - NodeAggregateIdentifier::fromString($databaseRow['nodeaggregateidentifier']), + NodeAggregateId::fromString($databaseRow['nodeaggregateidentifier']), OriginDimensionSpacePoint::fromJsonString($databaseRow['origindimensionspacepoint']), $databaseRow['origindimensionspacepointhash'], SerializedPropertyValues::fromJsonString($databaseRow['properties']), diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ProjectionHypergraph.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ProjectionHypergraph.php index 537bd4d8e37..ca0c390aa45 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ProjectionHypergraph.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ProjectionHypergraph.php @@ -20,8 +20,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Infrastructure\PostgresDbalClientInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; /** @@ -64,9 +64,9 @@ public function findNodeRecordByRelationAnchorPoint( * @throws \Exception */ public function findNodeRecordByCoverage( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateIdentifier ): ?NodeRecord { $query = ProjectionHypergraphQuery::create($contentStreamIdentifier, $this->tableNamePrefix); $query = $query->withDimensionSpacePoint($dimensionSpacePoint) @@ -81,9 +81,9 @@ public function findNodeRecordByCoverage( * @throws \Exception */ public function findNodeRecordByOrigin( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateIdentifier ): ?NodeRecord { $query = ProjectionHypergraphQuery::create($contentStreamIdentifier, $this->tableNamePrefix); $query = $query->withOriginDimensionSpacePoint($originDimensionSpacePoint); @@ -100,9 +100,9 @@ public function findNodeRecordByOrigin( * @throws \Doctrine\DBAL\Driver\Exception */ public function findParentNodeRecordByOrigin( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint, - NodeAggregateIdentifier $childNodeAggregateIdentifier + NodeAggregateId $childNodeAggregateIdentifier ): ?NodeRecord { $query = /** @lang PostgreSQL */ 'SELECT p.* @@ -154,9 +154,9 @@ public function findSucceedingSiblingNodeRecordByOrigin(): ?NodeRecord * @throws \Doctrine\DBAL\Driver\Exception */ public function findParentNodeRecordByCoverage( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $coveredDimensionSpacePoint, - NodeAggregateIdentifier $childNodeAggregateIdentifier + NodeAggregateId $childNodeAggregateIdentifier ): ?NodeRecord { $query = /** @lang PostgreSQL */ 'SELECT p.* @@ -185,8 +185,8 @@ public function findParentNodeRecordByCoverage( * @throws \Exception */ public function findNodeRecordsForNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier ): array { $query = ProjectionHypergraphQuery::create($contentStreamIdentifier, $this->tableNamePrefix); $query = $query->withNodeAggregateIdentifier($nodeAggregateIdentifier); @@ -204,7 +204,7 @@ public function findNodeRecordsForNodeAggregate( * @throws DBALException */ public function findIngoingHierarchyHyperrelationRecords( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, NodeRelationAnchorPoint $childNodeAnchor, ?DimensionSpacePointSet $affectedDimensionSpacePoints = null ): array { @@ -239,7 +239,7 @@ public function findIngoingHierarchyHyperrelationRecords( * @throws DBALException */ public function findOutgoingHierarchyHyperrelationRecords( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, NodeRelationAnchorPoint $parentNodeAnchor, ?DimensionSpacePointSet $affectedDimensionSpacePoints = null ): array { @@ -298,7 +298,7 @@ public function findOutgoingReferenceHyperrelationRecords( * @throws DBALException */ public function findHierarchyHyperrelationRecordByParentNodeAnchor( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, NodeRelationAnchorPoint $parentNodeAnchor ): ?HierarchyHyperrelationRecord { @@ -325,7 +325,7 @@ public function findHierarchyHyperrelationRecordByParentNodeAnchor( * @throws DBALException */ public function findHierarchyHyperrelationRecordByChildNodeAnchor( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, NodeRelationAnchorPoint $childNodeAnchor ): ?HierarchyHyperrelationRecord { @@ -378,9 +378,9 @@ public function findHierarchyHyperrelationRecordsByChildNodeAnchor( * @throws DBALException */ public function findChildHierarchyHyperrelationRecord( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateIdentifier ): ?HierarchyHyperrelationRecord { $query = /** @lang PostgreSQL */ 'SELECT h.* @@ -402,14 +402,14 @@ public function findChildHierarchyHyperrelationRecord( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamIdentifier * @param NodeRelationAnchorPoint $nodeRelationAnchorPoint * @return DimensionSpacePointSet * @throws DBALException * @throws \Doctrine\DBAL\Driver\Exception */ public function findCoverageByNodeRelationAnchorPoint( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, NodeRelationAnchorPoint $nodeRelationAnchorPoint ): DimensionSpacePointSet { $query = /** @lang PostgreSQL */ @@ -432,15 +432,15 @@ public function findCoverageByNodeRelationAnchorPoint( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param ContentStreamId $contentStreamIdentifier + * @param NodeAggregateId $nodeAggregateIdentifier * @return DimensionSpacePointSet * @throws DBALException * @throws \Doctrine\DBAL\Driver\Exception */ public function findCoverageByNodeAggregateIdentifier( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier ): DimensionSpacePointSet { $query = /** @lang PostgreSQL */ 'SELECT h.dimensionspacepoint @@ -462,17 +462,17 @@ public function findCoverageByNodeAggregateIdentifier( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamIdentifier * @param DimensionSpacePointSet $dimensionSpacePoints - * @param NodeAggregateIdentifier $originNodeAggregateIdentifier + * @param NodeAggregateId $originNodeAggregateIdentifier * @return array|RestrictionHyperrelationRecord[] * @throws DBALException * @throws \Doctrine\DBAL\Driver\Exception */ public function findOutgoingRestrictionRelations( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePointSet $dimensionSpacePoints, - NodeAggregateIdentifier $originNodeAggregateIdentifier + NodeAggregateId $originNodeAggregateIdentifier ): array { $query = /** @lang PostgreSQL */ 'SELECT r.* @@ -507,9 +507,9 @@ public function findOutgoingRestrictionRelations( * @throws \Doctrine\DBAL\Driver\Exception */ public function findIngoingRestrictionRelations( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateIdentifier ): array { $query = /** @lang PostgreSQL */ 'SELECT r.* @@ -534,17 +534,17 @@ public function findIngoingRestrictionRelations( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamIdentifier * @param DimensionSpacePointSet $dimensionSpacePoints - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateIdentifier * @return array|NodeAggregateIdentifiers[] * @throws DBALException * @throws \Doctrine\DBAL\Driver\Exception */ public function findDescendantNodeAggregateIdentifiers( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePointSet $dimensionSpacePoints, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateIdentifier ): array { $query = /** @lang PostgreSQL */ ' -- ProjectionHypergraph::findDescendantNodeAggregateIdentifiers @@ -598,7 +598,7 @@ public function findDescendantNodeAggregateIdentifiers( foreach ($rows as $row) { $nodeAggregateIdentifiersByDimensionSpacePoint[$row['dimensionspacepointhash']] [$row['nodeaggregateidentifier']] - = NodeAggregateIdentifier::fromString($row['nodeaggregateidentifier']); + = NodeAggregateId::fromString($row['nodeaggregateidentifier']); } return array_map(function (array $nodeAggregateIdentifiers) { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Query/ProjectionHypergraphQuery.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Query/ProjectionHypergraphQuery.php index 5254d9ee5ba..de622285fdb 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Query/ProjectionHypergraphQuery.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/Query/ProjectionHypergraphQuery.php @@ -19,9 +19,9 @@ use Doctrine\DBAL\Types\Types; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * @internal @@ -51,7 +51,7 @@ private function __construct(string $query, array $parameters, array $types) $this->types = $types; } - public static function create(ContentStreamIdentifier $contentStreamIdentifier, string $tableNamePrefix): self + public static function create(ContentStreamId $contentStreamIdentifier, string $tableNamePrefix): self { $query = /** @lang PostgreSQL */ 'SELECT n.* @@ -102,7 +102,7 @@ public function withOriginDimensionSpacePoint(OriginDimensionSpacePoint $originD return new self($query, $parameters, $this->types); } - public function withNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): self + public function withNodeAggregateIdentifier(NodeAggregateId $nodeAggregateIdentifier): self { $query = $this->query .= ' AND n.nodeaggregateidentifier = :nodeAggregateIdentifier'; diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ReferenceRelationRecord.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ReferenceRelationRecord.php index a2f0bee033b..55f5bb2605e 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ReferenceRelationRecord.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/ReferenceRelationRecord.php @@ -17,7 +17,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception as DBALException; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\ReferenceName; /** @@ -32,7 +32,7 @@ public function __construct( public readonly ReferenceName $name, public readonly int $position, public readonly ?SerializedPropertyValues $properties, - public readonly NodeAggregateIdentifier $targetNodeAggregateIdentifier + public readonly NodeAggregateId $targetNodeAggregateIdentifier ) { } @@ -48,7 +48,7 @@ public static function fromDatabaseRow(array $databaseRow): self $databaseRow['properties'] ? SerializedPropertyValues::fromJsonString($databaseRow['properties']) : null, - NodeAggregateIdentifier::fromString($databaseRow['targetnodeaggregateidentifier']) + NodeAggregateId::fromString($databaseRow['targetnodeaggregateidentifier']) ); } diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/RestrictionHyperrelationRecord.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/RestrictionHyperrelationRecord.php index 034d91f89f6..b9d00d8f24d 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/RestrictionHyperrelationRecord.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/RestrictionHyperrelationRecord.php @@ -16,8 +16,8 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception as DBALException; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * The active record for reading and writing restriction hyperrelations from and to the database @@ -26,18 +26,18 @@ */ final class RestrictionHyperrelationRecord { - public ContentStreamIdentifier $contentStreamIdentifier; + public ContentStreamId $contentStreamIdentifier; public string $dimensionSpacePointHash; - public NodeAggregateIdentifier $originNodeAggregateIdentifier; + public NodeAggregateId $originNodeAggregateIdentifier; public NodeAggregateIdentifiers $affectedNodeAggregateIdentifiers; public function __construct( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, string $dimensionSpacePointHash, - NodeAggregateIdentifier $originNodeAggregateIdentifier, + NodeAggregateId $originNodeAggregateIdentifier, NodeAggregateIdentifiers $affectedNodeAggregateIdentifiers ) { $this->contentStreamIdentifier = $contentStreamIdentifier; @@ -52,9 +52,9 @@ public function __construct( public static function fromDatabaseRow(array $databaseRow): self { return new self( - ContentStreamIdentifier::fromString($databaseRow['contentstreamidentifier']), + ContentStreamId::fromString($databaseRow['contentstreamidentifier']), $databaseRow['dimensionspacepointhash'], - NodeAggregateIdentifier::fromString($databaseRow['originnodeaggregateidentifier']), + NodeAggregateId::fromString($databaseRow['originnodeaggregateidentifier']), NodeAggregateIdentifiers::fromDatabaseString($databaseRow['affectednodeaggregateidentifiers']) ); } @@ -63,7 +63,7 @@ public static function fromDatabaseRow(array $databaseRow): self * @throws DBALException */ public function addAffectedNodeAggregateIdentifier( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, Connection $databaseConnection, string $tableNamePrefix ): void { @@ -80,7 +80,7 @@ public function addAffectedNodeAggregateIdentifier( * @throws DBALException */ public function removeAffectedNodeAggregateIdentifier( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, Connection $databaseConnection, string $tableNamePrefix ): void { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php index a1280594c1c..17c0326088c 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php @@ -24,8 +24,8 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; @@ -64,14 +64,14 @@ public function __construct( } public function getSubgraph( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, VisibilityConstraints $visibilityConstraints ): ContentSubgraphInterface { - $index = $contentStreamIdentifier . '-' . $dimensionSpacePoint->hash . '-' . $visibilityConstraints->getHash(); + $index = $contentStreamId . '-' . $dimensionSpacePoint->hash . '-' . $visibilityConstraints->getHash(); if (!isset($this->subhypergraphs[$index])) { $this->subhypergraphs[$index] = new ContentSubhypergraph( - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint, $visibilityConstraints, $this->databaseClient, @@ -84,14 +84,14 @@ public function getSubgraph( return $this->subhypergraphs[$index]; } - public function findNodeByIdentifiers( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + public function findNodeById( + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint ): ?Node { - $query = HypergraphQuery::create($contentStreamIdentifier, $this->tableNamePrefix); + $query = HypergraphQuery::create($contentStreamId, $this->tableNamePrefix); $query = $query->withOriginDimensionSpacePoint($originDimensionSpacePoint); - $query = $query->withNodeAggregateIdentifier($nodeAggregateIdentifier); + $query = $query->withNodeAggregateIdentifier($nodeAggregateId); $nodeRow = $query->execute($this->getDatabaseConnection())->fetchAssociative(); @@ -103,7 +103,7 @@ public function findNodeByIdentifiers( } public function findRootNodeAggregateByType( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeTypeName $nodeTypeName ): NodeAggregate { throw new \BadMethodCallException('method findRootNodeAggregateByType is not implemented yet.', 1645782874); @@ -113,18 +113,18 @@ public function findRootNodeAggregateByType( * @return \Iterator */ public function findNodeAggregatesByType( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeTypeName $nodeTypeName ): \Iterator { return new \Generator(); } - public function findNodeAggregateByIdentifier( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + public function findNodeAggregateById( + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId ): ?NodeAggregate { - $query = HypergraphQuery::create($contentStreamIdentifier, $this->tableNamePrefix, true); - $query = $query->withNodeAggregateIdentifier($nodeAggregateIdentifier); + $query = HypergraphQuery::create($contentStreamId, $this->tableNamePrefix, true); + $query = $query->withNodeAggregateIdentifier($nodeAggregateId); $nodeRows = $query->execute($this->getDatabaseConnection())->fetchAllAssociative(); @@ -135,8 +135,8 @@ public function findNodeAggregateByIdentifier( } public function findParentNodeAggregateByChildOriginDimensionSpacePoint( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint ): ?NodeAggregate { $query = /** @lang PostgreSQL */ ' @@ -157,8 +157,8 @@ public function findParentNodeAggregateByChildOriginDimensionSpacePoint( AND ch.contentstreamidentifier = :contentStreamIdentifier )'; $parameters = [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, - 'childNodeAggregateIdentifier' => (string)$childNodeAggregateIdentifier, + 'contentStreamIdentifier' => (string)$contentStreamId, + 'childNodeAggregateIdentifier' => (string)$childNodeAggregateId, 'childOriginDimensionSpacePointHash' => $childOriginDimensionSpacePoint->hash ]; @@ -177,11 +177,11 @@ public function findParentNodeAggregateByChildOriginDimensionSpacePoint( * @return iterable */ public function findParentNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId ): iterable { - $query = HypergraphParentQuery::create($contentStreamIdentifier, $this->tableNamePrefix); - $query = $query->withChildNodeAggregateIdentifier($childNodeAggregateIdentifier); + $query = HypergraphParentQuery::create($contentStreamId, $this->tableNamePrefix); + $query = $query->withChildNodeAggregateIdentifier($childNodeAggregateId); $nodeRows = $query->execute($this->getDatabaseConnection())->fetchAllAssociative(); @@ -195,12 +195,12 @@ public function findParentNodeAggregates( * @return iterable */ public function findChildNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId ): iterable { $query = HypergraphChildQuery::create( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $contentStreamId, + $parentNodeAggregateId, $this->tableNamePrefix ); @@ -216,13 +216,13 @@ public function findChildNodeAggregates( * @return iterable */ public function findChildNodeAggregatesByName( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId, NodeName $name ): iterable { $query = HypergraphChildQuery::create( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $contentStreamId, + $parentNodeAggregateId, $this->tableNamePrefix ); $query = $query->withChildNodeName($name); @@ -239,12 +239,12 @@ public function findChildNodeAggregatesByName( * @return iterable */ public function findTetheredChildNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId ): iterable { $query = HypergraphChildQuery::create( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $contentStreamId, + $parentNodeAggregateId, $this->tableNamePrefix ); $query = $query->withOnlyTethered(); @@ -255,15 +255,15 @@ public function findTetheredChildNodeAggregates( } public function getDimensionSpacePointsOccupiedByChildNodeName( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeName $nodeName, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $parentNodeOriginDimensionSpacePoint, DimensionSpacePointSet $dimensionSpacePointsToCheck ): DimensionSpacePointSet { $query = HypergraphChildQuery::create( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $contentStreamId, + $parentNodeAggregateId, $this->tableNamePrefix, ['ch.dimensionspacepoint, ch.dimensionspacepointhash'] ); diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php index 254ed90b40e..1ac1564c9b0 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php @@ -30,9 +30,9 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\References; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraintsWithSubNodeTypes; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes; @@ -40,7 +40,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints; @@ -65,7 +65,7 @@ final class ContentSubhypergraph implements ContentSubgraphInterface { public function __construct( - private readonly ContentStreamIdentifier $contentStreamIdentifier, + private readonly ContentStreamId $contentStreamIdentifier, private readonly DimensionSpacePoint $dimensionSpacePoint, private readonly VisibilityConstraints $visibilityConstraints, private readonly PostgresDbalClientInterface $databaseClient, @@ -75,7 +75,7 @@ public function __construct( ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { return $this->contentStreamIdentifier; } @@ -85,11 +85,11 @@ public function getDimensionSpacePoint(): DimensionSpacePoint return $this->dimensionSpacePoint; } - public function findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): ?Node + public function findNodeByNodeAggregateId(NodeAggregateId $nodeAggregateId): ?Node { $query = HypergraphQuery::create($this->contentStreamIdentifier, $this->tableNamePrefix); $query = $query->withDimensionSpacePoint($this->dimensionSpacePoint) - ->withNodeAggregateIdentifier($nodeAggregateIdentifier) + ->withNodeAggregateIdentifier($nodeAggregateId) ->withRestriction($this->visibilityConstraints); $nodeRow = $query->execute($this->getDatabaseConnection())->fetchAssociative(); @@ -102,14 +102,14 @@ public function findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeA } public function findChildNodes( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes { $query = HypergraphChildQuery::create( $this->contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $this->tableNamePrefix ); $query = $query->withDimensionSpacePoint($this->dimensionSpacePoint) @@ -137,12 +137,12 @@ public function findChildNodes( } public function countChildNodes( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraints $nodeTypeConstraints = null ): int { $query = HypergraphChildQuery::create( $this->contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $this->tableNamePrefix, ['COUNT(*)'] ); @@ -162,7 +162,7 @@ public function countChildNodes( } public function findReferencedNodes( - NodeAggregateIdentifier $nodeAggregateAggregateIdentifier, + NodeAggregateId $nodeAggregateId, PropertyName $name = null ): References { $query = HypergraphReferenceQuery::create( @@ -171,7 +171,7 @@ public function findReferencedNodes( $this->tableNamePrefix ); $query = $query->withDimensionSpacePoint($this->dimensionSpacePoint) - ->withSourceNodeAggregateIdentifier($nodeAggregateAggregateIdentifier) + ->withSourceNodeAggregateIdentifier($nodeAggregateId) ->withTargetRestriction($this->visibilityConstraints); $orderings = []; @@ -192,7 +192,7 @@ public function findReferencedNodes( } public function findReferencingNodes( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, PropertyName $name = null ): References { $query = HypergraphReferenceQuery::create( @@ -201,7 +201,7 @@ public function findReferencingNodes( $this->tableNamePrefix ); $query = $query->withDimensionSpacePoint($this->dimensionSpacePoint) - ->withTargetNodeAggregateIdentifier($nodeAggregateIdentifier) + ->withTargetNodeAggregateIdentifier($nodeAggregateId) ->withSourceRestriction($this->visibilityConstraints); $orderings = []; @@ -222,11 +222,11 @@ public function findReferencingNodes( ); } - public function findParentNode(NodeAggregateIdentifier $childNodeAggregateIdentifier): ?Node + public function findParentNode(NodeAggregateId $childNodeAggregateId): ?Node { $query = HypergraphParentQuery::create($this->contentStreamIdentifier, $this->tableNamePrefix); $query = $query->withDimensionSpacePoint($this->dimensionSpacePoint) - ->withChildNodeAggregateIdentifier($childNodeAggregateIdentifier); + ->withChildNodeAggregateIdentifier($childNodeAggregateId); $nodeRow = $query->execute($this->getDatabaseConnection())->fetchAssociative(); @@ -239,17 +239,17 @@ public function findParentNode(NodeAggregateIdentifier $childNodeAggregateIdenti public function findNodeByPath( NodePath $path, - NodeAggregateIdentifier $startingNodeAggregateIdentifier + NodeAggregateId $startingNodeAggregateId ): ?Node { - $currentNode = $this->findNodeByNodeAggregateIdentifier($startingNodeAggregateIdentifier); + $currentNode = $this->findNodeByNodeAggregateId($startingNodeAggregateId); if (!$currentNode) { throw new \RuntimeException( - 'Starting Node (identified by ' . $startingNodeAggregateIdentifier . ') does not exist.' + 'Starting Node (identified by ' . $startingNodeAggregateId . ') does not exist.' ); } foreach ($path->getParts() as $edgeName) { $currentNode = $this->findChildNodeConnectedThroughEdgeName( - $currentNode->nodeAggregateIdentifier, + $currentNode->nodeAggregateId, $edgeName ); if (!$currentNode) { @@ -261,12 +261,12 @@ public function findNodeByPath( } public function findChildNodeConnectedThroughEdgeName( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeName $edgeName ): ?Node { $query = HypergraphChildQuery::create( $this->contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $this->tableNamePrefix, ); $query = $query->withDimensionSpacePoint($this->dimensionSpacePoint) @@ -283,7 +283,7 @@ public function findChildNodeConnectedThroughEdgeName( } public function findSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, ?NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null @@ -298,7 +298,7 @@ public function findSiblings( } public function findSucceedingSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, ?NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null @@ -313,7 +313,7 @@ public function findSucceedingSiblings( } public function findPrecedingSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, ?NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null @@ -328,7 +328,7 @@ public function findPrecedingSiblings( } private function findAnySiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, HypergraphSiblingQueryMode $mode, ?NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, @@ -362,13 +362,13 @@ private function findAnySiblings( return $this->nodeFactory->mapNodeRowsToNodes($siblingsRows, $this->visibilityConstraints); } - public function findNodePath(NodeAggregateIdentifier $nodeAggregateIdentifier): NodePath + public function findNodePath(NodeAggregateId $nodeAggregateId): NodePath { return NodePath::fromString('/'); } public function findSubtrees( - NodeAggregateIdentifiers $entryNodeAggregateIdentifiers, + NodeAggregateIds $entryNodeAggregateIds, int $maximumLevels, NodeTypeConstraints $nodeTypeConstraints ): Subtree { @@ -425,7 +425,7 @@ public function findSubtrees( ORDER BY level DESC, ordinality ASC'; $parameters = [ - 'entryNodeAggregateIdentifiers' => $entryNodeAggregateIdentifiers->toStringArray(), + 'entryNodeAggregateIdentifiers' => $entryNodeAggregateIds->toStringArray(), 'contentStreamIdentifier' => (string)$this->contentStreamIdentifier, 'dimensionSpacePointHash' => $this->dimensionSpacePoint->hash, 'maximumLevels' => $maximumLevels @@ -442,7 +442,7 @@ public function findSubtrees( } public function findDescendants( - array $entryNodeAggregateIdentifiers, + array $entryNodeAggregateIds, NodeTypeConstraints $nodeTypeConstraints, ?SearchTerm $searchTerm ): Nodes { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/NodeFactory.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/NodeFactory.php index 103b2535d5f..0c3e9a7d943 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/NodeFactory.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/NodeFactory.php @@ -16,14 +16,14 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\Reference; use Neos\ContentRepository\Core\Projection\ContentGraph\References; use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; @@ -52,7 +52,7 @@ final class NodeFactory private PropertyConverter $propertyConverter; public function __construct( - private readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + private readonly ContentRepositoryId $contentRepositoryIdentifier, NodeTypeManager $nodeTypeManager, PropertyConverter $propertyConverter ) { @@ -67,17 +67,17 @@ public function mapNodeRowToNode( array $nodeRow, VisibilityConstraints $visibilityConstraints, ?DimensionSpacePoint $dimensionSpacePoint = null, - ?ContentStreamIdentifier $contentStreamIdentifier = null + ?ContentStreamId $contentStreamIdentifier = null ): Node { $nodeType = $this->nodeTypeManager->getNodeType($nodeRow['nodetypename']); $result = new Node( ContentSubgraphIdentity::create( $this->contentRepositoryIdentifier, - $contentStreamIdentifier ?: ContentStreamIdentifier::fromString($nodeRow['contentstreamidentifier']), + $contentStreamIdentifier ?: ContentStreamId::fromString($nodeRow['contentstreamidentifier']), $dimensionSpacePoint ?: DimensionSpacePoint::fromJsonString($nodeRow['dimensionspacepoint']), $visibilityConstraints ), - NodeAggregateIdentifier::fromString($nodeRow['nodeaggregateidentifier']), + NodeAggregateId::fromString($nodeRow['nodeaggregateidentifier']), OriginDimensionSpacePoint::fromJsonString($nodeRow['origindimensionspacepoint']), NodeAggregateClassification::from($nodeRow['classification']), NodeTypeName::fromString($nodeRow['nodetypename']), @@ -98,7 +98,7 @@ public function mapNodeRowToNode( public function mapNodeRowsToNodes( array $nodeRows, VisibilityConstraints $visibilityConstraints, - ContentStreamIdentifier $contentStreamIdentifier = null + ContentStreamId $contentStreamIdentifier = null ): Nodes { $nodes = []; foreach ($nodeRows as $nodeRow) { @@ -119,7 +119,7 @@ public function mapNodeRowsToNodes( public function mapReferenceRowsToReferences( array $referenceRows, VisibilityConstraints $visibilityConstraints, - ContentStreamIdentifier $contentStreamIdentifier = null + ContentStreamId $contentStreamIdentifier = null ): References { $references = []; foreach ($referenceRows as $referenceRow) { @@ -195,7 +195,7 @@ public function mapNodeRowsToNodeAggregate( $disabledDimensionSpacePoints = []; foreach ($nodeRows as $nodeRow) { $contentStreamIdentifier = $contentStreamIdentifier - ?: ContentStreamIdentifier::fromString($nodeRow['contentstreamidentifier']); + ?: ContentStreamId::fromString($nodeRow['contentstreamidentifier']); $node = $this->mapNodeRowToNode( $nodeRow, $visibilityConstraints, @@ -203,7 +203,7 @@ public function mapNodeRowsToNodeAggregate( $contentStreamIdentifier ); $nodeAggregateIdentifier = $nodeAggregateIdentifier - ?: NodeAggregateIdentifier::fromString($nodeRow['nodeaggregateidentifier']); + ?: NodeAggregateId::fromString($nodeRow['nodeaggregateidentifier']); $nodeAggregateClassification = $nodeAggregateClassification ?: NodeAggregateClassification::from($nodeRow['classification']); $nodeTypeName = $nodeTypeName ?: NodeTypeName::fromString($nodeRow['nodetypename']); @@ -254,7 +254,7 @@ public function mapNodeRowsToNodeAggregates(array $nodeRows, VisibilityConstrain } $contentStreamIdentifier = null; - /** @var NodeAggregateIdentifier[] $nodeAggregateIdentifiers */ + /** @var NodeAggregateId[] $nodeAggregateIdentifiers */ $nodeAggregateIdentifiers = []; /** @var NodeAggregateClassification[] $nodeAggregateClassifications */ $nodeAggregateClassifications = []; @@ -279,14 +279,14 @@ public function mapNodeRowsToNodeAggregates(array $nodeRows, VisibilityConstrain foreach ($nodeRows as $nodeRow) { $key = $nodeRow['nodeaggregateidentifier']; $contentStreamIdentifier = $contentStreamIdentifier - ?: ContentStreamIdentifier::fromString($nodeRow['contentstreamidentifier']); + ?: ContentStreamId::fromString($nodeRow['contentstreamidentifier']); $node = $this->mapNodeRowToNode( $nodeRow, $visibilityConstraints, null, $contentStreamIdentifier ); - $nodeAggregateIdentifiers[$key] = NodeAggregateIdentifier::fromString( + $nodeAggregateIdentifiers[$key] = NodeAggregateId::fromString( $nodeRow['nodeaggregateidentifier'] ); if (!isset($nodeAggregateClassifications[$key])) { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphChildQuery.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphChildQuery.php index 259442784bf..905650cb9a8 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphChildQuery.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphChildQuery.php @@ -19,8 +19,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\NodeRecord; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; @@ -37,8 +37,8 @@ final class HypergraphChildQuery implements HypergraphQueryInterface * @param array|null $fieldsToFetch */ public static function create( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $parentNodeAggregateIdentifier, string $tableNamePrefix, ?array $fieldsToFetch = null ): self { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphParentQuery.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphParentQuery.php index ca11a8949f3..797416471f3 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphParentQuery.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphParentQuery.php @@ -17,8 +17,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\HierarchyHyperrelationRecord; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\NodeRecord; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * @internal @@ -31,7 +31,7 @@ final class HypergraphParentQuery implements HypergraphQueryInterface * @param array|null $fieldsToFetch */ public static function create( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, string $tableNamePrefix, ?array $fieldsToFetch = null ): self { @@ -55,7 +55,7 @@ public static function create( return new self($query, $parameters, $tableNamePrefix); } - public function withChildNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): self + public function withChildNodeAggregateIdentifier(NodeAggregateId $nodeAggregateIdentifier): self { $query = $this->query .= ' AND cn.nodeaggregateidentifier = :nodeAggregateIdentifier'; diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphQuery.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphQuery.php index 12c0fdae98f..eaf4667f2d5 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphQuery.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphQuery.php @@ -18,8 +18,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\NodeRecord; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\RestrictionHyperrelationRecord; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; @@ -31,7 +31,7 @@ final class HypergraphQuery implements HypergraphQueryInterface use CommonGraphQueryOperations; public static function create( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, string $tableNamePrefix, bool $joinRestrictionRelations = false ): self { @@ -81,7 +81,7 @@ public function withOriginDimensionSpacePoint(OriginDimensionSpacePoint $originD return new self($query, $parameters, $this->tableNamePrefix); } - public function withNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): self + public function withNodeAggregateIdentifier(NodeAggregateId $nodeAggregateIdentifier): self { $query = $this->query .= ' AND n.nodeaggregateidentifier = :nodeAggregateIdentifier'; diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphReferenceQuery.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphReferenceQuery.php index daab87adb0a..98c8d71bd4e 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphReferenceQuery.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphReferenceQuery.php @@ -16,8 +16,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\ReferenceRelationRecord; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; @@ -29,7 +29,7 @@ final class HypergraphReferenceQuery implements HypergraphQueryInterface use CommonGraphQueryOperations; public static function create( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, string $nodeFieldsToFetch, string $tableNamePrefix ): self { @@ -70,7 +70,7 @@ public function withDimensionSpacePoint(DimensionSpacePoint $dimensionSpacePoint return new self($query, $parameters, $this->tableNamePrefix, $this->types); } - public function withSourceNodeAggregateIdentifier(NodeAggregateIdentifier $sourceNodeAggregateIdentifier): self + public function withSourceNodeAggregateIdentifier(NodeAggregateId $sourceNodeAggregateIdentifier): self { $query = $this->query; $query .= ' @@ -83,7 +83,7 @@ public function withSourceNodeAggregateIdentifier(NodeAggregateIdentifier $sourc } public function withTargetNodeAggregateIdentifier( - NodeAggregateIdentifier $targetNodeAggregateIdentifier + NodeAggregateId $targetNodeAggregateIdentifier ): self { $query = $this->query; $query .= ' diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphSiblingQuery.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphSiblingQuery.php index a748055e0cc..e72a7445768 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphSiblingQuery.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/HypergraphSiblingQuery.php @@ -15,8 +15,8 @@ namespace Neos\ContentGraph\PostgreSQLAdapter\Domain\Repository\Query; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; /** @@ -27,9 +27,9 @@ final class HypergraphSiblingQuery implements HypergraphQueryInterface use CommonGraphQueryOperations; public static function create( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, HypergraphSiblingQueryMode $queryMode, string $tableNamePrefix ): self { diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php b/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php index 64cedb3b5cd..62c9e79b892 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php @@ -7,7 +7,7 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\HypergraphProjection; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Repository\NodeFactory; use Neos\ContentGraph\PostgreSQLAdapter\Infrastructure\PostgresDbalClientInterface; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Factory\ProjectionFactoryDependencies; use Neos\ContentRepository\Core\Projection\CatchUpHookFactoryInterface; use Neos\ContentRepository\Core\Projection\ProjectionFactoryInterface; @@ -25,7 +25,7 @@ public function __construct( } public static function graphProjectionTableNamePrefix( - ContentRepositoryIdentifier $contentRepositoryIdentifier + ContentRepositoryId $contentRepositoryIdentifier ): string { return sprintf('cr_%s_p_hypergraph', $contentRepositoryIdentifier); } @@ -37,7 +37,7 @@ public function build( Projections $projectionsSoFar ): HypergraphProjection { $tableNamePrefix = self::graphProjectionTableNamePrefix( - $projectionFactoryDependencies->contentRepositoryIdentifier + $projectionFactoryDependencies->contentRepositoryId ); return new HypergraphProjection( @@ -45,7 +45,7 @@ public function build( $this->dbalClient, $catchUpHookFactory, new NodeFactory( - $projectionFactoryDependencies->contentRepositoryIdentifier, + $projectionFactoryDependencies->contentRepositoryId, $projectionFactoryDependencies->nodeTypeManager, $projectionFactoryDependencies->propertyConverter ), diff --git a/Neos.ContentRepository.BehavioralTests/Classes/Command/ContentStreamCommandController.php b/Neos.ContentRepository.BehavioralTests/Classes/Command/ContentStreamCommandController.php index c568b325db7..bf74a86bdf0 100644 --- a/Neos.ContentRepository.BehavioralTests/Classes/Command/ContentStreamCommandController.php +++ b/Neos.ContentRepository.BehavioralTests/Classes/Command/ContentStreamCommandController.php @@ -18,8 +18,8 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\HypergraphProjection; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Feature\ContentStreamForking\Event\ContentStreamWasForked; use Neos\ContentRepository\Core\Feature\NodeCreation\Event\NodeAggregateWithNodeWasCreated; @@ -27,7 +27,7 @@ use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\Flow\Cli\CommandController; final class ContentStreamCommandController extends CommandController @@ -36,7 +36,7 @@ final class ContentStreamCommandController extends CommandController // // private HypergraphProjector $hypergraphProjector; // -// private ContentStreamIdentifier $contentStreamIdentifier; +// private contentStreamId $contentStreamId; // // private DimensionSpacePointSet $dimensionSpacePoints; // @@ -44,7 +44,7 @@ final class ContentStreamCommandController extends CommandController // { // $this->graphProjector = $graphProjector; // $this->hypergraphProjector = $hypergraphProjector; -// $this->contentStreamIdentifier = ContentStreamIdentifier::fromString('cs-identifier'); +// $this->contentStreamId = contentStreamId::fromString('cs-identifier'); // $this->dimensionSpacePoints = new DimensionSpacePointSet([ // DimensionSpacePoint::fromArray(['language' => 'mul']), // DimensionSpacePoint::fromArray(['language' => 'de']), @@ -62,10 +62,10 @@ final class ContentStreamCommandController extends CommandController // { // $this->graphProjector->reset(); // $this->hypergraphProjector->reset(); -// $rootNodeAggregateIdentifier = NodeAggregateIdentifier::fromString('lady-eleonode-rootford'); +// $rootnodeAggregateId = nodeAggregateId::fromString('lady-eleonode-rootford'); // $rootNodeAggregateWasCreated = new RootNodeAggregateWithNodeWasCreated( -// $this->contentStreamIdentifier, -// $rootNodeAggregateIdentifier, +// $this->contentStreamId, +// $rootnodeAggregateId, // NodeTypeName::fromString('Neos.ContentRepository:Root'), // $this->dimensionSpacePoints, // NodeAggregateClassification::CLASSIFICATION_ROOT, @@ -74,7 +74,7 @@ final class ContentStreamCommandController extends CommandController // $this->graphProjector->whenRootNodeAggregateWithNodeWasCreated($rootNodeAggregateWasCreated); // $this->hypergraphProjector->whenRootNodeAggregateWithNodeWasCreated($rootNodeAggregateWasCreated); // #$time = microtime(true); -// $this->createHierarchy($rootNodeAggregateIdentifier, 1, $levels, $nodesPerLevel); +// $this->createHierarchy($rootnodeAggregateId, 1, $levels, $nodesPerLevel); // #$this->outputLine(microtime(true) - $time . ' elapsed'); // } // @@ -82,21 +82,21 @@ final class ContentStreamCommandController extends CommandController // * @throws \Throwable // */ // private function createHierarchy( -// NodeAggregateIdentifier $parentNodeAggregateIdentifier, +// nodeAggregateId $parentNodeAggregateId, // int $currentLevel, // int $maximumLevel, // int $numberOfNodes // ): void { // if ($currentLevel <= $maximumLevel) { // for ($i = 0; $i < $numberOfNodes; $i++) { -// $nodeAggregateIdentifier = NodeAggregateIdentifier::create(); +// $nodeAggregateId = nodeAggregateId::create(); // $nodeAggregateWasCreated = new NodeAggregateWithNodeWasCreated( -// $this->contentStreamIdentifier, -// $nodeAggregateIdentifier, +// $this->contentStreamId, +// $nodeAggregateId, // NodeTypeName::fromString('Neos.ContentRepository:Testing'), // OriginDimensionSpacePoint::fromArray(['language' => 'mul']), // $this->dimensionSpacePoints, -// $parentNodeAggregateIdentifier, +// $parentNodeAggregateId, // null, // SerializedPropertyValues::fromArray([]), // NodeAggregateClassification::CLASSIFICATION_REGULAR, @@ -104,7 +104,7 @@ final class ContentStreamCommandController extends CommandController // ); // $this->graphProjector->whenNodeAggregateWithNodeWasCreated($nodeAggregateWasCreated); // $this->hypergraphProjector->whenNodeAggregateWithNodeWasCreated($nodeAggregateWasCreated); -// $this->createHierarchy($nodeAggregateIdentifier, $currentLevel + 1, $maximumLevel, $numberOfNodes); +// $this->createHierarchy($nodeAggregateId, $currentLevel + 1, $maximumLevel, $numberOfNodes); // } // } // } @@ -115,8 +115,8 @@ final class ContentStreamCommandController extends CommandController // public function testPerformanceCommand(string $projectorName): void // { // $contentStreamWasForked = new ContentStreamWasForked( -// ContentStreamIdentifier::create(), -// $this->contentStreamIdentifier, +// contentStreamId::create(), +// $this->contentStreamId, // 1, // UserIdentifier::forSystemUser() // ); diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/01-CreateRootNodeAggregateWithNode_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/01-CreateRootNodeAggregateWithNode_ConstraintChecks.feature index 0ae8fbde33a..ca247ee8ed6 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/01-CreateRootNodeAggregateWithNode_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/01-CreateRootNodeAggregateWithNode_ConstraintChecks.feature @@ -21,41 +21,41 @@ Feature: Create a root node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date Scenario: Try to create a root node aggregate in a content stream that currently does not exist: When the command CreateRootNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "i-do-not-exist" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "i-do-not-exist" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository:Root" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" Scenario: Try to create a root node aggregate in a content stream where it is already present: When the command CreateRootNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyExists" Scenario: Try to create a root node aggregate of an abstract root node type: When the command CreateRootNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:AbstractRoot" | Then the last command should have thrown an exception of type "NodeTypeIsAbstract" Scenario: Try to create a root node aggregate of a non-root node type: When the command CreateRootNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NonRoot" | Then the last command should have thrown an exception of type "NodeTypeIsNotOfTypeRoot" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/02-CreateRootNodeAggregateWithNode_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/02-CreateRootNodeAggregateWithNode_WithoutDimensions.feature index 6ca5b8fe028..d3610ef7f33 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/02-CreateRootNodeAggregateWithNode_WithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/02-CreateRootNodeAggregateWithNode_WithoutDimensions.feature @@ -19,25 +19,25 @@ Feature: Create a root node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" Scenario: Create the initial root node aggregate using valid payload without dimensions When the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | Then I expect exactly 2 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 1 is of type "RootNodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [[]] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | nodeAggregateClassification | "root" | When the graph projection is fully up to date @@ -72,23 +72,23 @@ Feature: Create a root node aggregate Scenario: Create a root node aggregate using valid payload without dimensions Given the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date When the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository:Root" | Then I expect exactly 3 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 2 is of type "RootNodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [[]] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | nodeAggregateClassification | "root" | When the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNode_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNode_WithDimensions.feature index 0c7de13f74e..4f019b09697 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNode_WithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNode_WithDimensions.feature @@ -20,25 +20,25 @@ Feature: Create a root node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" Scenario: Create the initial root node aggregate using valid payload with dimensions When the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | Then I expect exactly 2 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 1 is of type "RootNodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"gsw"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | nodeAggregateClassification | "root" | When the graph projection is fully up to date @@ -84,23 +84,23 @@ Feature: Create a root node aggregate Scenario: Create a root node aggregate using valid payload without dimensions Given the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date When the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository:Root" | Then I expect exactly 3 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 2 is of type "RootNodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"gsw"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | nodeAggregateClassification | "root" | When the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/01-CreateNodeAggregateWithNode_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/01-CreateNodeAggregateWithNode_ConstraintChecks.feature index 9bfa7886b82..971bc802642 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/01-CreateNodeAggregateWithNode_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/01-CreateNodeAggregateWithNode_ConstraintChecks.feature @@ -35,24 +35,24 @@ Feature: Create node aggregate with node | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" And I am in dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date Scenario: Try to create a node aggregate in a content stream that currently does not exist: When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "non-existent-cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "non-existent-cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" @@ -60,46 +60,46 @@ Feature: Create node aggregate with node Scenario: Try to create a node aggregate in a content stream where it is already present: When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyExists" Scenario: Try to create a (non-root) node aggregate of a root node type: When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository:Root" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | Then the last command should have thrown an exception of type "NodeTypeIsOfTypeRoot" Scenario: Try to create a node aggregate of a non-existing node type: When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:IDoNotExist" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | Then the last command should have thrown an exception of type "NodeTypeNotFound" Scenario: Try to create a node aggregate of an abstract node type: When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:AbstractNode" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | Then the last command should have thrown an exception of type "NodeTypeIsAbstract" Scenario: Try to create a node aggregate in an origin dimension space point not within the allowed dimension subspace: When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | | originDimensionSpacePoint | {"undeclared": "undefined"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" @@ -107,9 +107,9 @@ Feature: Create node aggregate with node Scenario: Try to create a node aggregate as a child of a non-existing parent When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "i-do-not-exist" | + | parentNodeAggregateId | "i-do-not-exist" | | nodeName | "document" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" @@ -117,10 +117,10 @@ Feature: Create node aggregate with node Scenario: Try to create a node aggregate as a sibling of a non-existing succeeding sibling When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | succeedingSiblingNodeAggregateIdentifier | "i-do-not-exist" | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | succeedingSiblingNodeAggregateId | "i-do-not-exist" | | nodeName | "document" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" @@ -128,17 +128,17 @@ Feature: Create node aggregate with node Scenario: Try to create a node aggregate using a name that is already taken by one of its siblings Given the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | And the graph projection is fully up to date When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | Then the last command should have thrown an exception of type "NodeNameIsAlreadyOccupied" @@ -146,37 +146,37 @@ Feature: Create node aggregate with node Scenario: Try to create a node aggregate with a property the node type does not declare When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"iDoNotExist": "whatever"} | Then the last command should have thrown an exception of type "PropertyCannotBeSet" with code 1615664798 Scenario: Try to create a node aggregate with a property of a wrong type When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"postalAddress": "28 31st of February Street"} | Then the last command should have thrown an exception of type "PropertyCannotBeSet" with code 1615466573 Scenario: Try to create a node aggregate with a property having an undefined type When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithInvalidPropertyType" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"postalAddress": "28 31st of February Street"} | Then the last command should have thrown an exception of type "PropertyTypeIsInvalid" Scenario: Try to create a node aggregate with a property having a wrongly declared default value When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithInvalidDefaultValue" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | Then the last command should have thrown an exception of type "CallErrorException" Scenario: Try to create a node aggregate in an origin dimension space point the parent node does not cover: @@ -185,10 +185,10 @@ Feature: Create node aggregate with node | language | mul, de, gsw | gsw->de->mul | When the command CreateNodeAggregateWithNode is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | | originDimensionSpacePoint | {"language": "de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "child-node" | Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/02-CreateNodeAggregateWithNode_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/02-CreateNodeAggregateWithNode_WithoutDimensions.feature index ccb5ca26b26..3ee545dbab0 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/02-CreateNodeAggregateWithNode_WithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/02-CreateNodeAggregateWithNode_WithoutDimensions.feature @@ -20,15 +20,15 @@ Feature: Create node aggregate with node | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" And I am in dimension space point {} And I am user identified by "initiating-user-identifier" And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date @@ -46,7 +46,7 @@ Feature: Create node aggregate with node type: string """ When the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeName | parentNodeAggregateIdentifier | nodeTypeName | initialPropertyValues | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes | {"text": "initial text"} | | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes | {} | | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes | {} | @@ -54,34 +54,34 @@ Feature: Create node aggregate with node Then I expect exactly 5 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 2 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | [] | | coveredDimensionSpacePoints | [[]] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "node" | | initialPropertyValues | {"defaultText": {"value": "my default", "type": "string"}, "text": {"value": "initial text", "type": "string"}} | | nodeAggregateClassification | "regular" | And event at index 3 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | [] | | coveredDimensionSpacePoints | [[]] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-node" | | initialPropertyValues | {"defaultText": {"value": "my default", "type": "string"}} | | nodeAggregateClassification | "regular" | And event at index 4 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | [] | | coveredDimensionSpacePoints | [[]] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | initialPropertyValues | {"defaultText": {"value": "my default", "type": "string"}} | | nodeAggregateClassification | "regular" | @@ -203,34 +203,34 @@ Feature: Create node aggregate with node Scenario: Create node aggregate with initial node without auto-created child nodes before another one Given the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "node" | And the graph projection is fully up to date And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | - | succeedingSiblingNodeAggregateIdentifier | "sir-david-nodenborough" | + | succeedingSiblingNodeAggregateId | "sir-david-nodenborough" | Then I expect exactly 4 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 3 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | [] | | coveredDimensionSpacePoints | [[]] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | initialPropertyValues | [] | | nodeAggregateClassification | "regular" | - | succeedingNodeAggregateIdentifier | "sir-david-nodenborough" | + | succeedingNodeAggregateId | "sir-david-nodenborough" | When the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} @@ -274,45 +274,45 @@ Feature: Create node aggregate with node When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithTetheredChildNodes" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "node" | - | tetheredDescendantNodeAggregateIdentifiers | {"child-node": "nody-mc-nodeface", "child-node/grandchild-node": "nodimus-prime"} | + | tetheredDescendantNodeAggregateIds | {"child-node": "nody-mc-nodeface", "child-node/grandchild-node": "nodimus-prime"} | And the graph projection is fully up to date Then I expect exactly 5 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 2 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithTetheredChildNodes" | | originDimensionSpacePoint | [] | | coveredDimensionSpacePoints | [[]] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "node" | | initialPropertyValues | {"text": {"value": "my default", "type": "string"}} | | nodeAggregateClassification | "regular" | And event at index 3 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:SubNode" | | originDimensionSpacePoint | [] | | coveredDimensionSpacePoints | [[]] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-node" | | initialPropertyValues | {"text": {"value": "my sub default", "type": "string"}} | | nodeAggregateClassification | "tethered" | And event at index 4 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | nodeTypeName | "Neos.ContentRepository.Testing:SubSubNode" | | originDimensionSpacePoint | [] | | coveredDimensionSpacePoints | [[]] | - | parentNodeAggregateIdentifier | "nody-mc-nodeface" | + | parentNodeAggregateId | "nody-mc-nodeface" | | nodeName | "grandchild-node" | | initialPropertyValues | {"text": {"value": "my sub sub default", "type": "string"}} | | nodeAggregateClassification | "tethered" | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/03-CreateNodeAggregateWithNode_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/03-CreateNodeAggregateWithNode_WithDimensions.feature index 7996f0c646d..a22ddc4eabb 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/03-CreateNodeAggregateWithNode_WithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/03-CreateNodeAggregateWithNode_WithDimensions.feature @@ -19,13 +19,13 @@ Feature: Create node aggregate with node | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date @@ -43,7 +43,7 @@ Feature: Create node aggregate with node type: string """ When the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | originDimensionSpacePoint | nodeName | parentNodeAggregateIdentifier | nodeTypeName | initialPropertyValues | + | nodeAggregateId | originDimensionSpacePoint | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | sir-david-nodenborough | {"language":"mul"} | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes | {"text": "initial text"} | | nody-mc-nodeface | {"language":"de"} | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes | {} | | sir-nodeward-nodington-iii | {"language":"en"} | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes | {} | @@ -51,34 +51,34 @@ Feature: Create node aggregate with node Then I expect exactly 5 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 2 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | {"language":"mul"} | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "node" | | initialPropertyValues | {"defaultText": {"value": "my default", "type": "string"}, "text": {"value": "initial text", "type": "string"}} | | nodeAggregateClassification | "regular" | And event at index 3 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-node" | | initialPropertyValues | {"defaultText": {"value": "my default", "type": "string"}} | | nodeAggregateClassification | "regular" | And event at index 4 is of type "NodeAggregateWithNodeWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithoutTetheredChildNodes" | | originDimensionSpacePoint | {"language":"en"} | | coveredDimensionSpacePoints | [{"language":"en"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | initialPropertyValues | {"defaultText": {"value": "my default", "type": "string"}} | | nodeAggregateClassification | "regular" | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/04-CreateNodeAggregateWithNode_ComplexDefaultAndInitialProperties.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/04-CreateNodeAggregateWithNode_ComplexDefaultAndInitialProperties.feature index 856303b5079..96879e75027 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/04-CreateNodeAggregateWithNode_ComplexDefaultAndInitialProperties.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/02-NodeCreation/04-CreateNodeAggregateWithNode_ComplexDefaultAndInitialProperties.feature @@ -38,23 +38,23 @@ Feature: Create a node aggregate with complex default values | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" And I am in dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date Scenario: Create a node aggregate with complex default values When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | And the graph projection is fully up to date Then I expect a node identified by cs-identifier;nody-mc-nodeface;{} to exist in the content graph And I expect this node to have the following properties: @@ -68,9 +68,9 @@ Feature: Create a node aggregate with complex default values Scenario: Create a node aggregate with complex initial and default values When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Node" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"postalAddress":"PostalAddress:anotherDummy", "date":"Date:2021-03-13T17:33:17+00:00", "uri":"URI:https://www.neos.io"} | And the graph projection is fully up to date Then I expect a node identified by cs-identifier;nody-mc-nodeface;{} to exist in the content graph diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/01-CreateNodeVariant_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/01-CreateNodeVariant_ConstraintChecks.feature index 64a67a11119..5478a5b2dd7 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/01-CreateNodeVariant_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/01-CreateNodeVariant_ConstraintChecks.feature @@ -23,19 +23,19 @@ Feature: Create node variant | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"market":"DE", "language":"gsw"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeName | parentNodeAggregateIdentifier | nodeTypeName | tetheredDescendantNodeAggregateIdentifiers | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | tetheredDescendantNodeAggregateIds | | sir-david-nodenborough | document | lady-eleonode-rootford | Neos.ContentRepository.Testing:Document | {"tethered": "nodewyn-tetherton"} | # We have to add yet another node since we need test cases with a partially covering parent node # Node /document/child @@ -44,8 +44,8 @@ Feature: Create node variant Scenario: Try to create a variant in a content stream that does not exist yet When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "i-do-not-exist-yet" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "i-do-not-exist-yet" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" @@ -53,7 +53,7 @@ Feature: Create node variant Scenario: Try to create a variant in a node aggregate that currently does not exist When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "i-currently-do-not-exist" | + | nodeAggregateId | "i-currently-do-not-exist" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" @@ -61,7 +61,7 @@ Feature: Create node variant Scenario: Try to create a variant of a root node aggregate When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | Then the last command should have thrown an exception of type "NodeAggregateIsRoot" @@ -69,7 +69,7 @@ Feature: Create node variant Scenario: Try to create a variant in a tethered node aggregate When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | Then the last command should have thrown an exception of type "NodeAggregateIsTethered" @@ -77,7 +77,7 @@ Feature: Create node variant Scenario: Try to create a variant from a source dimension space point that does not exist When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"undeclared":"undefined"} | | targetOrigin | {"market":"DE", "language":"de"} | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" @@ -85,7 +85,7 @@ Feature: Create node variant Scenario: Try to create a variant from a source dimension space point that the node aggregate does not occupy When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | Then the last command should have thrown an exception of type "DimensionSpacePointIsNotYetOccupied" @@ -93,7 +93,7 @@ Feature: Create node variant Scenario: Try to create a variant to a target dimension space point that does not exist When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"undeclared":"undefined"} | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" @@ -101,7 +101,7 @@ Feature: Create node variant Scenario: Try to create a variant to a target dimension space point that the node aggregate already occupies When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"gsw"} | Then the last command should have thrown an exception of type "DimensionSpacePointIsAlreadyOccupied" @@ -109,7 +109,7 @@ Feature: Create node variant Scenario: Try to create a variant to a target dimension space point that neither the node aggregate nor its parent in the source dimension point cover When the command CreateNodeVariant is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"market":"DE", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/02-CreateNodeSpecializationVariant.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/02-CreateNodeSpecializationVariant.feature index a221f2817e5..06ef9e9eafa 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/02-CreateNodeSpecializationVariant.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/02-CreateNodeSpecializationVariant.feature @@ -28,17 +28,17 @@ Feature: Create node specialization | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"market":"DE", "language":"en"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeName | parentNodeAggregateIdentifier | nodeTypeName | tetheredDescendantNodeAggregateIdentifiers | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | tetheredDescendantNodeAggregateIds | # We have to add another node since root node aggregates do not support variation # Node /document | sir-david-nodenborough | document | lady-eleonode-rootford | Neos.ContentRepository.Testing:Document | {"tethered-node": "nodewyn-tetherton", "tethered-node/tethered-leaf": "nodimer-tetherton"} | @@ -49,7 +49,7 @@ Feature: Create node specialization Scenario: check the tree state before the specialization When I am in content stream "cs-identifier" and dimension space point {"market":"DE", "language":"en"} And the subtree for node aggregate "sir-david-nodenborough" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | sir-david-nodenborough | | 1 | nodewyn-tetherton | | 2 | nodimer-tetherton | @@ -58,15 +58,15 @@ Feature: Create node specialization Scenario: Create specialization of node to dimension space point without further specializations When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"CH", "language":"gsw"} | Then I expect exactly 9 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" # The first event is NodeAggregateWithNodeWasCreated And event at index 6 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"gsw"} | | specializationCoverage | [{"market":"CH", "language":"gsw"}] | @@ -74,8 +74,8 @@ Feature: Create node specialization # The first event is NodeAggregateWithNodeWasCreated And event at index 7 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"gsw"} | | specializationCoverage | [{"market":"CH", "language":"gsw"}] | @@ -83,8 +83,8 @@ Feature: Create node specialization # The first event is NodeAggregateWithNodeWasCreated And event at index 8 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"gsw"} | | specializationCoverage | [{"market":"CH", "language":"gsw"}] | @@ -164,7 +164,7 @@ Feature: Create node specialization | tethered-node | cs-identifier;nodewyn-tetherton;{"market":"CH", "language":"gsw"} | | child-document | cs-identifier;nody-mc-nodeface;{"market":"DE", "language":"en"} | And the subtree for node aggregate "sir-david-nodenborough" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | sir-david-nodenborough | | 1 | nodewyn-tetherton | | 2 | nodimer-tetherton | @@ -177,28 +177,28 @@ Feature: Create node specialization Scenario: Create specialization of node to dimension space point with further specializations When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"DE", "language":"de"} | Then I expect exactly 9 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 6 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"DE", "language":"de"} | | specializationCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | And event at index 7 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"DE", "language":"de"} | | specializationCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | And event at index 8 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"DE", "language":"de"} | | specializationCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | @@ -280,22 +280,22 @@ Feature: Create node specialization Scenario: Create specialization of node to dimension space point with specializations that are partially occupied When the event NodeSpecializationVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"de"} | | specializationCoverage | [{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | And the event NodeSpecializationVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"de"} | | specializationCoverage | [{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | And the event NodeSpecializationVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"de"} | | specializationCoverage | [{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | @@ -303,8 +303,8 @@ Feature: Create node specialization When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"CH", "language":"en"} | Then I expect exactly 12 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" @@ -312,8 +312,8 @@ Feature: Create node specialization # The second event is the above And event at index 9 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"en"} | | specializationCoverage | [{"market":"CH", "language":"en"}] | @@ -321,8 +321,8 @@ Feature: Create node specialization # The second event is the above And event at index 10 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"en"} | | specializationCoverage | [{"market":"CH", "language":"en"}] | @@ -330,8 +330,8 @@ Feature: Create node specialization # The second event is the above And event at index 11 is of type "NodeSpecializationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"DE", "language":"en"} | | specializationOrigin | {"market":"CH", "language":"en"} | | specializationCoverage | [{"market":"CH", "language":"en"}] | @@ -420,13 +420,13 @@ Feature: Create node specialization Scenario: Create specialization of node to dimension space point that is already covered Given the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"DE", "language":"de"} | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"DE", "language":"gsw"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/03-CreateNodeGeneralizationVariant.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/03-CreateNodeGeneralizationVariant.feature index 3af9f926f96..61334fba1a7 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/03-CreateNodeGeneralizationVariant.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/03-CreateNodeGeneralizationVariant.feature @@ -28,18 +28,18 @@ Feature: Create node generalization | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"market":"CH", "language":"gsw"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeName | parentNodeAggregateIdentifier | nodeTypeName | tetheredDescendantNodeAggregateIdentifiers | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | tetheredDescendantNodeAggregateIds | # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document # We add a tethered child node to provide for test cases for node aggregates of that classification @@ -54,7 +54,7 @@ Feature: Create node generalization Scenario: Create generalization of node to dimension space point without further generalizations When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"en"} | Then I expect exactly 9 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" @@ -66,22 +66,22 @@ Feature: Create node generalization # The event at index 5 was NodeAggregateWithNodeWasCreated for nody-mc-nodeface And event at index 6 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"en"} | | generalizationCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"},{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"}] | And event at index 7 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"en"} | | generalizationCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"},{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"}] | And event at index 8 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"en"} | | generalizationCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"},{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"}] | @@ -182,29 +182,29 @@ Feature: Create node generalization Scenario: Create generalization of node to dimension space point with further generalizations When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"gsw"} | Then I expect exactly 9 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 6 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"gsw"} | | generalizationCoverage | [{"market":"DE", "language":"gsw"}] | And event at index 7 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"gsw"} | | generalizationCoverage | [{"market":"DE", "language":"gsw"}] | And event at index 8 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"gsw"} | | generalizationCoverage | [{"market":"DE", "language":"gsw"}] | @@ -293,16 +293,16 @@ Feature: Create node generalization Scenario: Create generalization of node to dimension space point with specializations that are partially occupied and covered Given the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"en"} | Then I expect exactly 12 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" @@ -310,8 +310,8 @@ Feature: Create node generalization # The second event is the above And event at index 9 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"en"} | | generalizationCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"}] | @@ -319,8 +319,8 @@ Feature: Create node generalization # The second event is the above And event at index 10 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"en"} | | generalizationCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"}] | @@ -328,8 +328,8 @@ Feature: Create node generalization # The second event is the above And event at index 11 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"en"} | | generalizationCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"}] | @@ -433,16 +433,16 @@ Feature: Create node generalization Scenario: Create generalization of a node to a dimension space point that is already covered by a more general generalization Given the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"en"} | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | targetOrigin | {"market":"DE", "language":"de"} | Then I expect exactly 12 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" @@ -450,8 +450,8 @@ Feature: Create node generalization # The second event is the above And event at index 9 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"de"} | | generalizationCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"}] | @@ -459,8 +459,8 @@ Feature: Create node generalization # The second event is the above And event at index 10 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"de"} | | generalizationCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"}] | @@ -468,8 +468,8 @@ Feature: Create node generalization # The second event is the above And event at index 11 is of type "NodeGeneralizationVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | sourceOrigin | {"market":"CH", "language":"gsw"} | | generalizationOrigin | {"market":"DE", "language":"de"} | | generalizationCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"}] | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/04-CreateNodePeerVariant.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/04-CreateNodePeerVariant.feature index fb14295e7c4..928ce661b43 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/04-CreateNodePeerVariant.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/03-NodeVariation/04-CreateNodePeerVariant.feature @@ -28,17 +28,17 @@ Feature: Create node peer variant | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"market":"DE", "language":"en"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | originDimensionSpacePoint | nodeName | parentNodeAggregateIdentifier | nodeTypeName | tetheredDescendantNodeAggregateIdentifiers | + | nodeAggregateId | originDimensionSpacePoint | nodeName | parentNodeAggregateId | nodeTypeName | tetheredDescendantNodeAggregateIds | # We have to add another node since root nodes have no origin dimension space points and thus cannot be varied. # We also need a tethered child node to test that it is reachable from the freshly created peer variant of the parent # and we need a tethered child node of the tethered child node to test that this works recursively @@ -55,29 +55,29 @@ Feature: Create node peer variant Scenario: Create peer variant of node to dimension space point without specializations When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"CH", "language":"fr"} | Then I expect exactly 13 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 10 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | peerOrigin | {"market":"CH", "language":"fr"} | | peerCoverage | [{"market":"CH", "language":"fr"}] | And event at index 11 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | sourceOrigin | {"market":"DE", "language":"en"} | | peerOrigin | {"market":"CH", "language":"fr"} | | peerCoverage | [{"market":"CH", "language":"fr"}] | And event at index 12 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimus-mediocre" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimus-mediocre" | | sourceOrigin | {"market":"DE", "language":"en"} | | peerOrigin | {"market":"CH", "language":"fr"} | | peerCoverage | [{"market":"CH", "language":"fr"}] | @@ -225,22 +225,22 @@ Feature: Create node peer variant Scenario: Create peer variant of node to dimension space point with specializations that are partially occupied Given the event NodePeerVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "madame-lanode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "madame-lanode" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"de"} | | peerCoverage | [{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | And the event NodePeerVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-prime" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-prime" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"de"} | | peerCoverage | [{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | And the event NodePeerVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-mediocre" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-mediocre" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"de"} | | peerCoverage | [{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | @@ -248,8 +248,8 @@ Feature: Create node peer variant When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "madame-lanode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "madame-lanode" | | sourceOrigin | {"market":"CH", "language":"fr"} | | targetOrigin | {"market":"DE", "language":"en"} | Then I expect exactly 16 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" @@ -257,8 +257,8 @@ Feature: Create node peer variant # The second is the first above And event at index 13 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "madame-lanode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "madame-lanode" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"en"} | | peerCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"}] | @@ -266,8 +266,8 @@ Feature: Create node peer variant # The second is the second above And event at index 14 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-prime" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-prime" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"en"} | | peerCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"}] | @@ -275,8 +275,8 @@ Feature: Create node peer variant # The second is the third above And event at index 15 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-mediocre" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-mediocre" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"en"} | | peerCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"}] | @@ -429,22 +429,22 @@ Feature: Create node peer variant Scenario: Create peer variant of node to dimension space point that is already covered Given the event NodePeerVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "madame-lanode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "madame-lanode" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"en"} | | peerCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"},{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | And the event NodePeerVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-prime" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-prime" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"en"} | | peerCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"},{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | And the event NodePeerVariantWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-mediocre" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-mediocre" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"en"} | | peerCoverage | [{"market":"DE", "language":"en"},{"market":"CH", "language":"en"},{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | @@ -452,8 +452,8 @@ Feature: Create node peer variant When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "madame-lanode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "madame-lanode" | | sourceOrigin | {"market":"CH", "language":"fr"} | | targetOrigin | {"market":"DE", "language":"de"} | Then I expect exactly 16 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" @@ -461,8 +461,8 @@ Feature: Create node peer variant # The second is the first above And event at index 13 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "madame-lanode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "madame-lanode" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"de"} | | peerCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | @@ -470,8 +470,8 @@ Feature: Create node peer variant # The second is the second above And event at index 14 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-prime" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-prime" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"de"} | | peerCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | @@ -479,8 +479,8 @@ Feature: Create node peer variant # The second is the third above And event at index 15 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodesis-mediocre" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodesis-mediocre" | | sourceOrigin | {"market":"CH", "language":"fr"} | | peerOrigin | {"market":"DE", "language":"de"} | | peerCoverage | [{"market":"DE", "language":"de"},{"market":"CH", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"gsw"}] | @@ -680,23 +680,23 @@ Feature: Create node peer variant Scenario: Create a peer node variant to a dimension space point with specializations and where the parent node aggregate is already specialized in Given the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"DE", "language":"fr"} | And the graph projection is fully up to date And the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"market":"DE", "language":"fr"} | | targetOrigin | {"market":"CH", "language":"fr"} | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"market":"DE", "language":"en"} | | targetOrigin | {"market":"DE", "language":"fr"} | Then I expect exactly 17 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" @@ -711,8 +711,8 @@ Feature: Create node peer variant # Event 17 is NodePeerVariantWasCreated for Nody McNodeface And event at index 16 is of type "NodePeerVariantWasCreated" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"market":"DE", "language":"en"} | | peerOrigin | {"market":"DE", "language":"fr"} | | peerCoverage | [{"market":"DE", "language":"fr"},{"market":"CH", "language":"fr"}] | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/01-SetNodeProperties_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/01-SetNodeProperties_ConstraintChecks.feature index 023abb53ffd..97312e646e8 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/01-SetNodeProperties_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/01-SetNodeProperties_ConstraintChecks.feature @@ -23,25 +23,25 @@ Feature: Set node properties: Constraint checks | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeName | parentNodeAggregateIdentifier | nodeTypeName | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | | nody-mc-nodeface | document | lady-eleonode-rootford | Neos.ContentRepository.Testing:Document | Scenario: Try to set properties in a content stream that does not exist yet When the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "i-do-not-exist-yet" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "i-do-not-exist-yet" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {"language":"de"} | | propertyValues | {"text":"New text"} | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" @@ -49,7 +49,7 @@ Feature: Set node properties: Constraint checks Scenario: Try to set properties on a node aggregate that currently does not exist When the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "i-currently-do-not-exist" | + | nodeAggregateId | "i-currently-do-not-exist" | | originDimensionSpacePoint | {"language":"de"} | | propertyValues | {"text":"New text"} | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" @@ -57,7 +57,7 @@ Feature: Set node properties: Constraint checks Scenario: Try to set properties on a root node aggregate When the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | originDimensionSpacePoint | {"language":"de"} | | propertyValues | {} | Then the last command should have thrown an exception of type "NodeAggregateIsRoot" @@ -65,7 +65,7 @@ Feature: Set node properties: Constraint checks Scenario: Try to set properties in an origin dimension space point that does not exist When the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {"language":"wat"} | | propertyValues | {"text":"New text"} | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" @@ -73,7 +73,7 @@ Feature: Set node properties: Constraint checks Scenario: Try to set properties in an origin dimension space point the node aggregate does not occupy When the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {"language":"gsw"} | | propertyValues | {"text":"New text"} | Then the last command should have thrown an exception of type "DimensionSpacePointIsNotYetOccupied" @@ -81,13 +81,13 @@ Feature: Set node properties: Constraint checks Scenario: Try to set a property the node type does not declare When the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | propertyValues | {"i-do-not-exist": "whatever"} | Then the last command should have thrown an exception of type "PropertyCannotBeSet" with code 1615664798 Scenario: Try to set a property with a value of a wrong type When the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | propertyValues | {"postalAddress": "28 31st of February Street"} | Then the last command should have thrown an exception of type "PropertyCannotBeSet" with code 1615466573 diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/02-SetNodeProperties.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/02-SetNodeProperties.feature index ccfdacbe996..2fcd7c13694 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/02-SetNodeProperties.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/02-SetNodeProperties.feature @@ -53,28 +53,28 @@ Feature: Set properties | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"mul"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeName | parentNodeAggregateIdentifier | nodeTypeName | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | | nody-mc-nodeface | document | lady-eleonode-rootford | Neos.ContentRepository.Testing:Document | And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"de"} | And the graph projection is fully up to date And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"gsw"} | And the graph projection is fully up to date @@ -82,8 +82,8 @@ Feature: Set properties Scenario: Set node properties And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {"language": "de"} | | propertyValues | {"string":"My new string", "int":8472, "float":72.84, "bool":true, "array":{"givenName":"David", "familyName":"Nodenborough","age":84}, "date":"Date:2021-03-13T17:33:17+00:00", "uri":"URI:https://www.neos.io", "postalAddress":"PostalAddress:anotherDummy"} | And the graph projection is fully up to date @@ -102,8 +102,8 @@ Feature: Set properties Scenario: Set node properties, partially And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {"language": "de"} | | propertyValues | {"string":"My new string"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/03-SetNodeProperties_PropertyScopes.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/03-SetNodeProperties_PropertyScopes.feature index 1816c74cef1..0cdf9bc4951 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/03-SetNodeProperties_PropertyScopes.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/04-NodeModification/03-SetNodeProperties_PropertyScopes.feature @@ -34,28 +34,28 @@ Feature: Set node properties with different scopes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"mul"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeName | parentNodeAggregateIdentifier | nodeTypeName | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | | nody-mc-nodeface | document | lady-eleonode-rootford | Neos.ContentRepository.Testing:Document | And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"de"} | And the graph projection is fully up to date And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"gsw"} | And the graph projection is fully up to date @@ -63,8 +63,8 @@ Feature: Set node properties with different scopes Scenario: Set node properties And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {"language": "de"} | | propertyValues | {"unscopedProperty":"My new string", "nodeScopedProperty":"My new string", "specializationsScopedProperty":"My new string", "nodeAggregateScopedProperty":"My new string"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/01-SetNodeReferences_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/01-SetNodeReferences_ConstraintChecks.feature index bda2da35830..6358541edfd 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/01-SetNodeReferences_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/01-SetNodeReferences_ConstraintChecks.feature @@ -37,35 +37,35 @@ Feature: Constraint checks on SetNodeReferences | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | | source-nodandaise | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | | anthony-destinode | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | | berta-destinode | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | - # checks for contentStreamIdentifier + # checks for contentStreamId Scenario: Try to reference nodes in a non-existent content stream When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "i-do-not-exist" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "i-do-not-exist" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target":"anthony-destinode"}] | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" with code 1521386692 - # checks for sourceNodeAggregateIdentifier + # checks for sourceNodeAggregateId Scenario: Try to reference nodes in a non-existent node aggregate When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "i-do-not-exist" | + | sourceNodeAggregateId | "i-do-not-exist" | | referenceName | "referenceProperty" | | references | [{"target":"anthony-destinode"}] | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" with code 1541678486 @@ -73,7 +73,7 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference nodes in a root node aggregate When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "lady-eleonode-rootford" | + | sourceNodeAggregateId | "lady-eleonode-rootford" | | referenceName | "referenceProperty" | | references | [{"target":"anthony-destinode"}] | Then the last command should have thrown an exception of type "NodeAggregateIsRoot" @@ -82,7 +82,7 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference nodes in an origin dimension space point that does not exist When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | sourceOriginDimensionSpacePoint | {"undeclared":"undefined"} | | referenceName | "referenceProperty" | | references | [{"target":"anthony-destinode"}] | @@ -91,17 +91,17 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference nodes in an origin dimension space point the source node aggregate does not occupy When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | sourceOriginDimensionSpacePoint | {"language":"en"} | | referenceName | "referenceProperty" | | references | [{"target":"anthony-destinode"}] | Then the last command should have thrown an exception of type "DimensionSpacePointIsNotYetOccupied" with code 1552595396 - # checks for destinationNodeAggregateIdentifiers + # checks for destinationnodeAggregateIds Scenario: Try to reference a non-existent node aggregate When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target":"i-do-not-exist"}] | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" with code 1541678486 @@ -109,7 +109,7 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference a root node aggregate When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target":"lady-eleonode-rootford"}] | Then the last command should have thrown an exception of type "NodeAggregateIsRoot" @@ -117,7 +117,7 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference a node aggregate of a type not matching the constraints When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "constrainedReferenceProperty" | | references | [{"target":"anthony-destinode"}] | Then the last command should have thrown an exception of type "ReferenceCannotBeSet" with code 1648502149 @@ -125,15 +125,15 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference a node aggregate which does not cover the source origin Given the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithReferences" | | originDimensionSpacePoint | {"language":"en"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | And the graph projection is fully up to date When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | referenceName | "referenceProperty" | | references | [{"target":"sir-david-nodenborough"}] | @@ -143,7 +143,7 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference nodes in an undefined property: When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "i-do-not-exist" | | references | [{"target":"anthony-destinode"}] | Then the last command should have thrown an exception of type "ReferenceCannotBeSet" with code 1618670106 @@ -151,7 +151,7 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference nodes in a property that is not of type reference(s): When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "nonReferenceProperty" | | references | [{"target":"anthony-destinode"}] | Then the last command should have thrown an exception of type "ReferenceCannotBeSet" with code 1618670106 @@ -159,8 +159,8 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to reference a node aggregate using a property the reference does not declare When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referencePropertyWithProperties" | | references | [{"target":"anthony-destinode", "properties":{"i-do-not-exist": "whatever"}}] | Then the last command should have thrown an exception of type "ReferenceCannotBeSet" with code 1658406662 @@ -168,8 +168,8 @@ Feature: Constraint checks on SetNodeReferences Scenario: Try to set a property with a value of a wrong type When the command SetNodeReferences is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referencePropertyWithProperties" | | references | [{"target":"anthony-destinode", "properties":{"postalAddress": "28 31st of February Street"}}] | Then the last command should have thrown an exception of type "ReferenceCannotBeSet" with code 1658406762 diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/02-SetNodeReferences_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/02-SetNodeReferences_WithoutDimensions.feature index 338fcca0967..d07ccd90e84 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/02-SetNodeReferences_WithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/02-SetNodeReferences_WithoutDimensions.feature @@ -41,16 +41,16 @@ Feature: Node References without Dimensions | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | parentNodeAggregateIdentifier | nodeTypeName | + | nodeAggregateId | parentNodeAggregateId | nodeTypeName | | source-nodandaise | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithReferences | | anthony-destinode | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithReferences | | berta-destinode | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithReferences | @@ -59,10 +59,10 @@ Feature: Node References without Dimensions Scenario: Ensure that a single reference between nodes can be set and read When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target": "anthony-destinode"}] | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node cs-identifier;source-nodandaise;{} @@ -78,10 +78,10 @@ Feature: Node References without Dimensions Scenario: Ensure that a single reference with properties between nodes can be set and read When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referencePropertyWithProperty" | | references | [{"target": "anthony-destinode", "properties":{"text":"my text", "postalAddress":"PostalAddress:dummy"}}] | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node cs-identifier;source-nodandaise;{} @@ -97,10 +97,10 @@ Feature: Node References without Dimensions Scenario: Ensure that multiple references between nodes can be set and read When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referencesProperty" | | references | [{"target": "berta-destinode"}, {"target": "carl-destinode"}] | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node cs-identifier;source-nodandaise;{} @@ -122,10 +122,10 @@ Feature: Node References without Dimensions Scenario: Ensure that multiple references with properties between nodes can be set and read When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referencesPropertyWithProperty" | | references | [{"target":"berta-destinode", "properties":{"text":"my text", "postalAddress":"PostalAddress:dummy"}}, {"target":"carl-destinode", "properties":{"text":"my other text", "postalAddress":"PostalAddress:anotherDummy"}}] | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node cs-identifier;source-nodandaise;{} @@ -147,18 +147,18 @@ Feature: Node References without Dimensions Scenario: Ensure that references between nodes can be set and overwritten When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [{"target": "berta-destinode"}, {"target": "carl-destinode"}] | | referenceName | "referencesProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [{"target": "anthony-destinode"}] | | referenceName | "referencesProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node cs-identifier;source-nodandaise;{} @@ -181,18 +181,18 @@ Feature: Node References without Dimensions When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [{"target": "berta-destinode"}, {"target": "carl-destinode"}] | | referenceName | "referencesProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [{"target": "carl-destinode"}, {"target": "berta-destinode"}] | | referenceName | "referencesProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node cs-identifier;source-nodandaise;{} @@ -205,18 +205,18 @@ Feature: Node References without Dimensions When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [{"target": "berta-destinode"}, {"target": "carl-destinode"}] | | referenceName | "referencesProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [] | | referenceName | "referencesProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date @@ -233,18 +233,18 @@ Feature: Node References without Dimensions When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [{"target": "anthony-destinode"}] | | referenceName | "referenceProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "berta-destinode" | + | sourceNodeAggregateId | "berta-destinode" | | references | [{"target": "anthony-destinode"}] | | referenceName | "referenceProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "anthony-destinode" to lead to node cs-identifier;anthony-destinode;{} @@ -256,10 +256,10 @@ Feature: Node References without Dimensions Scenario: Ensure that a reference between nodes can be set and read when matching constraints When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | references | [{"target": "anthony-destinode"}] | | referenceName | "restrictedReferenceProperty" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node cs-identifier;source-nodandaise;{} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/03-SetNodeReferences_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/03-SetNodeReferences_WithDimensions.feature index c3394c67aa9..6a0a3ef0608 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/03-SetNodeReferences_WithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/03-SetNodeReferences_WithDimensions.feature @@ -27,23 +27,23 @@ Feature: Node References with Dimensions | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | | source-nodandaise | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | | anthony-destinode | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | Scenario: Create a reference and check whether they can be read in the different subgraphs When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target": "anthony-destinode"}] | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/04-SetNodeReferences_PropertyScopes.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/04-SetNodeReferences_PropertyScopes.feature index 1af389cc42a..3f198177c51 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/04-SetNodeReferences_PropertyScopes.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/04-SetNodeReferences_PropertyScopes.feature @@ -41,29 +41,29 @@ Feature: Set node properties with different scopes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"mul"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | parentNodeAggregateIdentifier | nodeTypeName | + | nodeAggregateId | parentNodeAggregateId | nodeTypeName | | source-nodandaise | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithReferences | | anthony-destinode | lady-eleonode-rootford | Neos.ContentRepository.Testing:NodeWithReferences | And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "source-nodandaise" | + | nodeAggregateId | "source-nodandaise" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"de"} | And the graph projection is fully up to date And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "source-nodandaise" | + | nodeAggregateId | "source-nodandaise" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"gsw"} | And the graph projection is fully up to date @@ -71,57 +71,57 @@ Feature: Set node properties with different scopes Scenario: Set node properties And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "unscopedReference" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "unscopedReferences" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "nodeScopedReference" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "nodeScopedReferences" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "nodeAggregateScopedReference" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "nodeAggregateScopedReferences" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "specializationsScopedReference" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "specializationsScopedReferences" | | sourceOriginDimensionSpacePoint | {"language": "de"} | | references | [{"target": "anthony-destinode"}] | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/05-NodeVariation_After_NodeReferencing.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/05-NodeVariation_After_NodeReferencing.feature index 9f9f321f748..7f111e6e9cd 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/05-NodeVariation_After_NodeReferencing.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/05-NodeReferencing/05-NodeVariation_After_NodeReferencing.feature @@ -27,30 +27,30 @@ Feature: Node References with Dimensions | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | | source-nodandaise | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | | anthony-destinode | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | Scenario: Create a reference, then specialize the source node; and the references should exist on the specialization When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target": "anthony-destinode"}] | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "source-nodandaise" | + | nodeAggregateId | "source-nodandaise" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"ch"} | And the graph projection is fully up to date @@ -81,7 +81,7 @@ Feature: Node References with Dimensions # now, when modifying the specialization reference, only the specialization is changed. When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | sourceOriginDimensionSpacePoint | {"language": "ch"} | | referenceName | "referenceProperty" | | references | [{"target": "source-nodandaise"}] | @@ -111,14 +111,14 @@ Feature: Node References with Dimensions Scenario: specialize the source node, only set reference on the specialization. Then, the reference should only appear on the specialization When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "source-nodandaise" | + | nodeAggregateId | "source-nodandaise" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"ch"} | And the graph projection is fully up to date When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | sourceOriginDimensionSpacePoint | {"language": "ch"} | | referenceName | "referenceProperty" | | references | [{"target": "anthony-destinode"}] | @@ -149,21 +149,21 @@ Feature: Node References with Dimensions # prerequisite: "anthony-destinode" also exists in EN When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "anthony-destinode" | + | nodeAggregateId | "anthony-destinode" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | And the graph projection is fully up to date When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target": "anthony-destinode"}] | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "source-nodandaise" | + | nodeAggregateId | "source-nodandaise" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | And the graph projection is fully up to date @@ -204,7 +204,7 @@ Feature: Node References with Dimensions # now, when modifying the peer reference, only the peer is changed. When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | sourceOriginDimensionSpacePoint | {"language": "en"} | | referenceName | "referenceProperty" | | references | [{"target": "source-nodandaise"}] | @@ -245,15 +245,15 @@ Feature: Node References with Dimensions # We need to create a new ch-only node to test this; as by default, only a german node already exists shining through in ch And the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "ch-only" | + | nodeAggregateId | "ch-only" | | originDimensionSpacePoint | {"language": "ch"} | | nodeTypeName | "Neos.ContentRepository.Testing:NodeWithReferences" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | And the graph projection is fully up to date When the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "ch-only" | + | sourceNodeAggregateId | "ch-only" | | sourceOriginDimensionSpacePoint | {"language": "ch"} | | referenceName | "referenceProperty" | | references | [{"target": "anthony-destinode"}] | @@ -262,7 +262,7 @@ Feature: Node References with Dimensions # here we generalize When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "ch-only" | + | nodeAggregateId | "ch-only" | | sourceOrigin | {"language":"ch"} | | targetOrigin | {"language":"de"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/01-DisableNodeAggregate_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/01-DisableNodeAggregate_ConstraintChecks.feature index e20647bd107..f7dceeb8016 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/01-DisableNodeAggregate_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/01-DisableNodeAggregate_ConstraintChecks.feature @@ -20,44 +20,44 @@ Feature: Constraint checks on node aggregate disabling | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | Scenario: Try to disable a node aggregate in a non-existing content stream When the command DisableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "i-do-not-exist" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "i-do-not-exist" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" Scenario: Try to disable a non-existing node aggregate When the command DisableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "i-do-not-exist" | + | nodeAggregateId | "i-do-not-exist" | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" Scenario: Try to disable an already disabled node aggregate Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language": "de"} | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date When the command DisableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language": "de"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDisablesDimensionSpacePoint" @@ -65,7 +65,7 @@ Feature: Constraint checks on node aggregate disabling Scenario: Try to disable a node aggregate in a non-existing dimension space point When the command DisableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"undeclared": "undefined"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" @@ -73,7 +73,7 @@ Feature: Constraint checks on node aggregate disabling Scenario: Try to disable a node aggregate in a dimension space point it does not cover When the command DisableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language": "en"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/02-DisableNodeAggregate_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/02-DisableNodeAggregate_WithoutDimensions.feature index ad099fc49e2..57220da2ab6 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/02-DisableNodeAggregate_WithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/02-DisableNodeAggregate_WithoutDimensions.feature @@ -21,23 +21,23 @@ Feature: Disable a node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | preceding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | preceding-document | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | | succeeding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | succeeding-document | | nody-mc-nodeface | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | child-document | And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "preceding-nodenborough" | + | sourceNodeAggregateId | "preceding-nodenborough" | | referenceName | "references" | | references | [{"target": "sir-david-nodenborough"}] | And the graph projection is fully up to date @@ -45,16 +45,16 @@ Feature: Disable a node aggregate Scenario: Disable node with arbitrary strategy since dimensions are not involved When the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 8 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 7 is of type "NodeAggregateWasDisabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [[]] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | When the graph projection is fully up to date And I am in content stream "cs-identifier" @@ -77,7 +77,7 @@ Feature: Disable a node aggregate | document | cs-identifier;sir-david-nodenborough;{} | | succeeding-document | cs-identifier;succeeding-nodenborough;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -121,7 +121,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{} | | succeeding-document | cs-identifier;succeeding-nodenborough;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/03-DisableNodeAggregate_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/03-DisableNodeAggregate_WithDimensions.feature index b11f6ab53d8..6a61cc63ba6 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/03-DisableNodeAggregate_WithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/03-DisableNodeAggregate_WithDimensions.feature @@ -23,29 +23,29 @@ Feature: Disable a node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"mul"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | preceding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | preceding-document | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | | succeeding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | succeeding-document | | nody-mc-nodeface | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | child-document | And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "preceding-nodenborough" | + | sourceNodeAggregateId | "preceding-nodenborough" | | referenceName | "references" | | references | [{"target": "sir-david-nodenborough"}] | # We need both a real and a virtual specialization to test the different selection strategies And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"ltz"} | And the graph projection is fully up to date @@ -55,16 +55,16 @@ Feature: Disable a node aggregate Scenario: Disable node aggregate with strategy allSpecializations When the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allSpecializations" | Then I expect exactly 9 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 8 is of type "NodeAggregateWasDisabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{"language":"de"}, {"language":"ltz"}, {"language":"gsw"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | When the graph projection is fully up to date And I am in content stream "cs-identifier" @@ -89,7 +89,7 @@ Feature: Disable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -133,7 +133,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -162,7 +162,7 @@ Feature: Disable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -208,7 +208,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -237,7 +237,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -267,7 +267,7 @@ Feature: Disable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -307,16 +307,16 @@ Feature: Disable a node aggregate Scenario: Disable node aggregate with strategy allVariants When the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 9 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 8 is of type "NodeAggregateWasDisabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{"language":"ltz"}, {"language":"mul"}, {"language":"de"}, {"language":"en"}, {"language":"gsw"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | When the graph projection is fully up to date And I am in content stream "cs-identifier" @@ -341,7 +341,7 @@ Feature: Disable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -385,7 +385,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -413,7 +413,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -442,7 +442,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -471,7 +471,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -500,7 +500,7 @@ Feature: Disable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/04-EnableNodeAggregate_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/04-EnableNodeAggregate_ConstraintChecks.feature index 98090fa82b5..fb8ec158e6a 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/04-EnableNodeAggregate_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/04-EnableNodeAggregate_ConstraintChecks.feature @@ -20,44 +20,44 @@ Feature: Enable a node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | Scenario: Try to enable a node aggregate in a non-existing content stream When the command EnableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "i-do-not-exist" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "i-do-not-exist" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" Scenario: Try to enable a non-existing node aggregate When the command EnableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "i-do-not-exist" | + | nodeAggregateId | "i-do-not-exist" | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" Scenario: Try to enable an already enabled node aggregate When the command EnableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotDisableDimensionSpacePoint" Scenario: Try to enable a node aggregate in a non-existing dimension space point When the command EnableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"undeclared": "undefined"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" @@ -65,7 +65,7 @@ Feature: Enable a node aggregate Scenario: Try to disable a node aggregate in a dimension space point it does not cover When the command EnableNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language": "en"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/05-EnableNodeAggregate_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/05-EnableNodeAggregate_WithoutDimensions.feature index ff6f69ed662..f732a9a5217 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/05-EnableNodeAggregate_WithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/05-EnableNodeAggregate_WithoutDimensions.feature @@ -21,23 +21,23 @@ Feature: Enable a node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | preceding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | preceding-document | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | | succeeding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | succeeding-document | | nody-mc-nodeface | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | child-document | And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "preceding-nodenborough" | + | sourceNodeAggregateId | "preceding-nodenborough" | | referenceName | "references" | | references | [{"target": "sir-david-nodenborough"}] | And the graph projection is fully up to date @@ -45,20 +45,20 @@ Feature: Enable a node aggregate Scenario: Enable a previously disabled node with arbitrary strategy since dimensions are not involved Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date When the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 9 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 8 is of type "NodeAggregateWasEnabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [[]] | When the graph projection is fully up to date @@ -82,7 +82,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{} | | succeeding-document | cs-identifier;succeeding-nodenborough;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -122,24 +122,24 @@ Feature: Enable a node aggregate Scenario: Enable a previously disabled node with explicitly disabled child nodes with arbitrary strategy since dimensions are not involved Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date When the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 10 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 9 is of type "NodeAggregateWasEnabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [[]] | When the graph projection is fully up to date @@ -159,7 +159,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{} | | succeeding-document | cs-identifier;succeeding-nodenborough;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -199,24 +199,24 @@ Feature: Enable a node aggregate Scenario: Enable a previously disabled node with explicitly disabled parent node with arbitrary strategy since dimensions are not involved Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date When the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 10 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 9 is of type "NodeAggregateWasEnabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | affectedDimensionSpacePoints | [[]] | When the graph projection is fully up to date @@ -235,7 +235,7 @@ Feature: Enable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{} | | succeeding-document | cs-identifier;succeeding-nodenborough;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/06-EnableNodeAggregate_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/06-EnableNodeAggregate_WithDimensions.feature index 78f4ca82c39..c1d26693edb 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/06-EnableNodeAggregate_WithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/06-EnableNodeAggregate_WithDimensions.feature @@ -23,16 +23,16 @@ Feature: Enable a node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"mul"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | preceding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | preceding-document | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | | succeeding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | succeeding-document | @@ -40,26 +40,26 @@ Feature: Enable a node aggregate | the-great-nodini | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | court-magician | And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "preceding-nodenborough" | + | sourceNodeAggregateId | "preceding-nodenborough" | | referenceName | "references" | | references | [{"target": "sir-david-nodenborough"}] | # We need both a real and a virtual specialization to test the different selection strategies And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"ltz"} | And the graph projection is fully up to date # Disable our reference node aggregate in all variants And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date # Explicitly disable a child node aggregate in all variants And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date # Set the DSP to the "central" variant having variants of all kind @@ -69,16 +69,16 @@ Feature: Enable a node aggregate When I am in dimension space point {"language":"de"} And the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allSpecializations" | Then I expect exactly 12 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 11 is of type "NodeAggregateWasEnabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{"language":"de"},{"language":"ltz"},{"language":"gsw"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | When the graph projection is fully up to date And I am in content stream "cs-identifier" @@ -107,7 +107,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -159,7 +159,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -208,7 +208,7 @@ Feature: Enable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -239,7 +239,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -290,7 +290,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"ltz"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -340,7 +340,7 @@ Feature: Enable a node aggregate | preceding-document | cs-identifier;preceding-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | succeeding-nodenborough | @@ -365,16 +365,16 @@ Feature: Enable a node aggregate When I am in dimension space point {"language":"de"} And the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 12 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 11 is of type "NodeAggregateWasEnabled" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"gsw"},{"language":"ltz"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | When the graph projection is fully up to date And I am in content stream "cs-identifier" @@ -403,7 +403,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -455,7 +455,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -505,7 +505,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -555,7 +555,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -606,7 +606,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"ltz"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -657,7 +657,7 @@ Feature: Enable a node aggregate | document | cs-identifier;sir-david-nodenborough;{"language":"mul"} | | succeeding-document | cs-identifier;succeeding-nodenborough;{"language":"mul"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -701,7 +701,7 @@ Feature: Enable a node aggregate When I am in dimension space point {"language":"de"} And the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | nodeVariantSelectionStrategy | "allVariants" | When the graph projection is fully up to date @@ -719,7 +719,7 @@ Feature: Enable a node aggregate | child-document | cs-identifier;nody-mc-nodeface;{"language":"mul"} | | court-magician | cs-identifier;the-great-nodini;{"language":"mul"} | And the subtree for node aggregate "sir-david-nodenborough" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | sir-david-nodenborough | | 1 | nody-mc-nodeface | | 1 | the-great-nodini | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/07-CreateNodeAggregateWithNodeWithDisabledAncestor_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/07-CreateNodeAggregateWithNodeWithDisabledAncestor_WithoutDimensions.feature index 9c401d7baa2..bb207776f3b 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/07-CreateNodeAggregateWithNodeWithDisabledAncestor_WithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/07-CreateNodeAggregateWithNodeWithDisabledAncestor_WithoutDimensions.feature @@ -19,26 +19,26 @@ Feature: Creation of nodes underneath disabled nodes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date Scenario: When a new node is created underneath a hidden node, this one should be hidden as well When the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | nodingers-cat | Neos.ContentRepository.Testing:Document | the-great-nodini | pet-document | Then I expect the node aggregate "nodingers-cat" to exist And I expect this node aggregate to disable dimension space points [] @@ -46,7 +46,7 @@ Feature: Creation of nodes underneath disabled nodes When the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date Then I expect node aggregate identifier "nodingers-cat" and node path "document/pet-document" to lead to node cs-identifier;nodingers-cat;{} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/08-CreateNodeAggregateWithNodeWithDisabledAncestor_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/08-CreateNodeAggregateWithNodeWithDisabledAncestor_WithDimensions.feature index f0e901602cd..93df6b0a528 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/08-CreateNodeAggregateWithNodeWithDisabledAncestor_WithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/08-CreateNodeAggregateWithNodeWithDisabledAncestor_WithDimensions.feature @@ -21,21 +21,21 @@ Feature: Creation of nodes underneath disabled nodes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"mul"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | # We need both a real and a virtual specialization to test the different selection strategies And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"mul"} | | targetOrigin | {"language":"ltz"} | And the graph projection is fully up to date @@ -44,11 +44,11 @@ Feature: Creation of nodes underneath disabled nodes Scenario: Create a new node with parent disabled with strategy allSpecializations Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | When the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | nodingers-cat | Neos.ContentRepository.Testing:Document | the-great-nodini | pet-document | Then I expect the node aggregate "nodingers-cat" to exist @@ -73,7 +73,7 @@ Feature: Creation of nodes underneath disabled nodes And the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date @@ -93,11 +93,11 @@ Feature: Creation of nodes underneath disabled nodes Scenario: Create a new node with parent disabled with strategy allVariants Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allVariants" | When the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | nodingers-cat | Neos.ContentRepository.Testing:Document | the-great-nodini | pet-document | Then I expect the node aggregate "nodingers-cat" to exist @@ -120,7 +120,7 @@ Feature: Creation of nodes underneath disabled nodes And the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/09-CreateNodeVariantOfDisabledNode.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/09-CreateNodeVariantOfDisabledNode.feature index 4661ff816e6..046470c2888 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/09-CreateNodeVariantOfDisabledNode.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/06-NodeDisabling/09-CreateNodeVariantOfDisabledNode.feature @@ -19,12 +19,12 @@ Feature: Variation of hidden nodes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"mul"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And VisibilityConstraints are set to "frontend" @@ -32,24 +32,24 @@ Feature: Variation of hidden nodes Scenario: Specialize a node where the specialization target is enabled Given I am in dimension space point {"language":"de"} And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | court-magician | And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date And the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"gsw"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | And the graph projection is fully up to date @@ -62,18 +62,18 @@ Feature: Variation of hidden nodes Scenario: Specialize a node where the specialization target is disabled Given I am in dimension space point {"language":"de"} And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | court-magician | And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | And the graph projection is fully up to date @@ -86,7 +86,7 @@ Feature: Variation of hidden nodes When the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"gsw"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date @@ -97,18 +97,18 @@ Feature: Variation of hidden nodes Scenario: Generalize a node where the generalization target is enabled Given I am in dimension space point {"language":"de"} And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | court-magician | And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"mul"} | And the graph projection is fully up to date @@ -122,25 +122,25 @@ Feature: Variation of hidden nodes Scenario: Generalize a node where the generalization target is disabled Given I am in dimension space point {"language":"ltz"} And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | court-magician | And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"ltz"} | | targetOrigin | {"language":"mul"} | And the graph projection is fully up to date And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"mul"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"ltz"} | | targetOrigin | {"language":"de"} | And the graph projection is fully up to date @@ -153,7 +153,7 @@ Feature: Variation of hidden nodes When the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date @@ -164,18 +164,18 @@ Feature: Variation of hidden nodes Scenario: Peer vary a node where the peer target is enabled Given I am in dimension space point {"language":"de"} And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | court-magician | And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | And the graph projection is fully up to date @@ -189,24 +189,24 @@ Feature: Variation of hidden nodes Scenario: Peer vary a node where the peer target is disabled Given I am in dimension space point {"language":"de"} And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | the-great-nodini | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | court-magician | And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"mul"} | And the graph projection is fully up to date And the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"mul"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | And the graph projection is fully up to date @@ -219,7 +219,7 @@ Feature: Variation of hidden nodes When the command EnableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "the-great-nodini" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {"language":"en"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature index bfa6a6722e1..7e4a3e4b2b2 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature @@ -24,23 +24,23 @@ Feature: Remove NodeAggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | tetheredDescendantNodeAggregateIdentifiers | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | tetheredDescendantNodeAggregateIds | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | {"tethered":"nodewyn-tetherton"} | Scenario: Try to remove a node aggregate in a non-existing content stream When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "i-do-not-exist" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "i-do-not-exist" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" @@ -48,7 +48,7 @@ Feature: Remove NodeAggregate Scenario: Try to remove a non-existing node aggregate When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "i-do-not-exist" | + | nodeAggregateId | "i-do-not-exist" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" @@ -56,7 +56,7 @@ Feature: Remove NodeAggregate Scenario: Try to remove a tethered node aggregate When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | nodeAggregateId | "nodewyn-tetherton" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | Then the last command should have thrown an exception of type "TetheredNodeAggregateCannotBeRemoved" @@ -64,7 +64,7 @@ Feature: Remove NodeAggregate Scenario: Try to remove a node aggregate in a non-existing dimension space point When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"undeclared": "undefined"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" @@ -72,7 +72,7 @@ Feature: Remove NodeAggregate Scenario: Try to remove a node aggregate in a dimension space point the node aggregate does not cover When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language": "en"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint" @@ -80,7 +80,7 @@ Feature: Remove NodeAggregate Scenario: Try to remove a node aggregate using a non-existent removalAttachmentPoint When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | | removalAttachmentPoint | "i-do-not-exist" | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/02-RemoveNodeAggregate_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/02-RemoveNodeAggregate_WithoutDimensions.feature index 0cf3edcb653..4ac5c6bb23a 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/02-RemoveNodeAggregate_WithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/02-RemoveNodeAggregate_WithoutDimensions.feature @@ -21,38 +21,38 @@ Feature: Remove NodeAggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | | nodingers-cat | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | pet | | nodingers-kitten | Neos.ContentRepository.Testing:Document | nodingers-cat | kitten | And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "nodingers-cat" | + | sourceNodeAggregateId | "nodingers-cat" | | referenceName | "references" | | references | [{"target": "sir-david-nodenborough"}] | Scenario: Remove a node aggregate When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 7 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 6 is of type "NodeAggregateWasRemoved" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodingers-cat" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodingers-cat" | | affectedOccupiedDimensionSpacePoints | [[]] | | affectedCoveredDimensionSpacePoints | [[]] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | removalAttachmentPoint | null | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 2 nodes @@ -63,7 +63,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 1 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | And I expect node aggregate identifier "sir-david-nodenborough" and node path "document" to lead to node cs-identifier;sir-david-nodenborough;{} @@ -75,19 +75,19 @@ Feature: Remove NodeAggregate Scenario: Disable a node aggregate, remove it, recreate it and expect it to be enabled When the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the command RemoveNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "pet" | And the graph projection is fully up to date @@ -103,7 +103,7 @@ Feature: Remove NodeAggregate | document | cs-identifier;sir-david-nodenborough;{} | | pet | cs-identifier;nodingers-cat;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 1 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | | 1 | nodingers-cat | @@ -115,14 +115,14 @@ Feature: Remove NodeAggregate Scenario: Remove a node aggregate, recreate it and expect it to have no references When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "pet" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/03-RemoveNodeAggregate_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/03-RemoveNodeAggregate_WithDimensions.feature index 73ccb57af1a..c7b4a22fffb 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/03-RemoveNodeAggregate_WithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/03-RemoveNodeAggregate_WithDimensions.feature @@ -23,39 +23,39 @@ Feature: Remove NodeAggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"en"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | | nodingers-cat | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | pet | | nodingers-kitten | Neos.ContentRepository.Testing:Document | nodingers-cat | kitten | And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "nodingers-cat" | + | sourceNodeAggregateId | "nodingers-cat" | | referenceName | "references" | | references | [{"target": "sir-david-nodenborough"}] | Scenario: Remove a node aggregate with strategy allSpecializations When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | Then I expect exactly 7 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 6 is of type "NodeAggregateWasRemoved" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodingers-cat" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodingers-cat" | | affectedOccupiedDimensionSpacePoints | [{"language":"en"}] | | affectedCoveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | removalAttachmentPoint | null | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes @@ -75,7 +75,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | @@ -96,7 +96,7 @@ Feature: Remove NodeAggregate | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | | pet | cs-identifier;nodingers-cat;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | | 1 | nodingers-cat | @@ -133,7 +133,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | @@ -155,7 +155,7 @@ Feature: Remove NodeAggregate | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | | pet | cs-identifier;nodingers-cat;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | | 1 | nodingers-cat | @@ -188,24 +188,24 @@ Feature: Remove NodeAggregate Scenario: Remove a node aggregate with strategy allVariants When the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | sourceOrigin | {"language":"en"} | | targetOrigin | {"language":"de"} | And the graph projection is fully up to date When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allVariants" | Then I expect exactly 8 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 7 is of type "NodeAggregateWasRemoved" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodingers-cat" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodingers-cat" | | affectedOccupiedDimensionSpacePoints | [{"language":"en"},{"language":"de"}] | | affectedCoveredDimensionSpacePoints | [{"language":"en"},{"language":"de"},{"language":"fr"},{"language":"gsw"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | removalAttachmentPoint | null | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 2 nodes @@ -219,7 +219,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | @@ -239,7 +239,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | @@ -259,7 +259,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | @@ -279,7 +279,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | @@ -295,16 +295,16 @@ Feature: Remove NodeAggregate Scenario: Disable a node aggregate, completely remove it, recreate it and expect it to be enabled but have no references When the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the command RemoveNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | nodingers-cat | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | pet | | nodingers-kitten | Neos.ContentRepository.Testing:Document | nodingers-cat | kitten | @@ -321,7 +321,7 @@ Feature: Remove NodeAggregate | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | | pet | cs-identifier;nodingers-cat;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | | 1 | nodingers-cat | @@ -350,18 +350,18 @@ Feature: Remove NodeAggregate Scenario: Disable a node aggregate, partially remove it, recreate it and expect the recreated nodes to be enabled and have their source's references When the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | nodeVariantSelectionStrategy | "allVariants" | And the graph projection is fully up to date And the command RemoveNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allSpecializations" | And the graph projection is fully up to date And the command CreateNodeVariant is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nodingers-cat" | + | nodeAggregateId | "nodingers-cat" | | sourceOrigin | {"language":"en"} | | targetOrigin | {"language":"de"} | And the graph projection is fully up to date @@ -384,7 +384,7 @@ Feature: Remove NodeAggregate | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | | pet | cs-identifier;nodingers-cat;{"language":"de"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | | 1 | nodingers-cat | @@ -416,7 +416,7 @@ Feature: Remove NodeAggregate | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | | pet | cs-identifier;nodingers-cat;{"language":"de"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | | 1 | nodingers-cat | @@ -447,7 +447,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | @@ -468,7 +468,7 @@ Feature: Remove NodeAggregate | Name | NodeDiscriminator | | document | cs-identifier;sir-david-nodenborough;{"language":"en"} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | sir-david-nodenborough | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithDisabledNodesWithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithDisabledNodesWithoutDimensions.feature index aabedf1253c..3be09eab18e 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithDisabledNodesWithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithDisabledNodesWithoutDimensions.feature @@ -19,53 +19,53 @@ Feature: On forking a content stream, hidden nodes should be correctly copied as | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "the-great-nodini" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "the-great-nodini" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "court-magician" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodingers-cat" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodingers-cat" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "the-great-nodini" | + | parentNodeAggregateId | "the-great-nodini" | | nodeName | "pet" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date And the command DisableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "the-great-nodini" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "the-great-nodini" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the graph projection is fully up to date Scenario: on ForkContentStream, the disabled nodes in the target content stream should still be invisible. When the command ForkContentStream is executed with payload: | Key | Value | - | sourceContentStreamIdentifier | "cs-identifier" | - | contentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | sourceContentStreamId | "cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | When the graph projection is fully up to date @@ -78,7 +78,7 @@ Feature: On forking a content stream, hidden nodes should be correctly copied as | Name | NodeDiscriminator | | court-magician | user-cs-identifier;the-great-nodini;{} | And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | the-great-nodini | | 2 | nodingers-cat | @@ -87,7 +87,7 @@ Feature: On forking a content stream, hidden nodes should be correctly copied as Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node user-cs-identifier;lady-eleonode-rootford;{} And I expect this node to have no child nodes And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | And I expect node aggregate identifier "the-great-nodini" and node path "court-magician" to lead to no node And I expect node aggregate identifier "nodingers-cat" and node path "court-magician/pet" to lead to no node diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithoutDimensions.feature index 55d24093479..3be382f5eda 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/ForkContentStreamWithoutDimensions.feature @@ -19,41 +19,41 @@ Feature: ForkContentStream Without Dimensions And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "user-identifier" | + | initiatingUserId | "user-identifier" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "child" | | nodeAggregateClassification | "regular" | And the Event "NodePropertiesWereSet" was published to stream "Neos.ContentRepository:ContentStream:cs-identifier" with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": {"value": "original value", "type": "string"}} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | Scenario: Ensure that the node is available in the forked content stream When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date And I am in content stream "user-cs-identifier" and dimension space point {} @@ -62,16 +62,16 @@ Feature: ForkContentStream Without Dimensions Scenario: When a change is applied to the forked content stream AFTER the fork, it is not visible in the live content stream. When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the Event "NodePropertiesWereSet" was published to stream "Neos.ContentRepository:ContentStream:user-cs-identifier" with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": {"value": "modified value", "type": "string"}} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # live @@ -92,16 +92,16 @@ Feature: ForkContentStream Without Dimensions Scenario: When a change is applied on the live content stream AFTER the fork, it is NOT visible in the forked content stream. When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the Event "NodePropertiesWereSet" was published to stream "Neos.ContentRepository:ContentStream:cs-identifier" with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": {"value": "modified value", "type": "string"}} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # live diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/NodeReferencesOnForkContentStream.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/NodeReferencesOnForkContentStream.feature index 5ef8a1a661a..9f4135d4b14 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/NodeReferencesOnForkContentStream.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ContentStreamForking/NodeReferencesOnForkContentStream.feature @@ -26,31 +26,31 @@ Feature: On forking a content stream, node references should be copied as well. | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | | source-nodandaise | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | | anthony-destinode | Neos.ContentRepository.Testing:NodeWithReferences | lady-eleonode-rootford | Scenario: Create a reference, trigger copy-on-write of the nodes, and ensure reference still exists. Given the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | sourceNodeAggregateId | "source-nodandaise" | | referenceName | "referenceProperty" | | references | [{"target": "anthony-destinode"}] | And the graph projection is fully up to date When the command ForkContentStream is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "cs-identifier" | And the graph projection is fully up to date # after forking, the reference must still exist on the forked content stream (no surprises here). @@ -79,8 +79,8 @@ Feature: On forking a content stream, node references should be copied as well. When I am in content stream "user-cs-identifier" and dimension space point {"language": "de"} And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "source-nodandaise" | | propertyValues | {"text": "Modified in live workspace"} | And the graph projection is fully up to date Then I expect node aggregate identifier "source-nodandaise" to lead to node user-cs-identifier;source-nodandaise;{"language": "de"} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddDimensionShineThrough.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddDimensionShineThrough.feature index 14a337e5bc8..24d06fa5b04 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddDimensionShineThrough.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddDimensionShineThrough.feature @@ -35,27 +35,27 @@ Feature: Add Dimension Specialization | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "hello" } | And the graph projection is fully up to date @@ -110,11 +110,11 @@ Feature: Add Dimension Specialization # as expected) And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "migration-cs" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "migration-cs" | + | nodeAggregateId | "sir-david-nodenborough" | | originDimensionSpacePoint | {"language": "de"} | | propertyValues | {"text": "changed"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in content stream "migration-cs" and dimension space point {"language": "de"} Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node migration-cs;sir-david-nodenborough;{"language": "de"} @@ -144,11 +144,11 @@ Feature: Add Dimension Specialization When the command DisableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language": "de"} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the graph projection is fully up to date # ensure the node is disabled @@ -202,11 +202,11 @@ Feature: Add Dimension Specialization # we create a node in CH When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | - | initiatingUserIdentifier | "foo" | + | initiatingUserId | "foo" | When I run the following node migration for workspace "live", creating content streams "migration-cs" and exceptions are caught: diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddNewProperty_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddNewProperty_NoDimensions.feature index fe1fe3c94de..487499278e7 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddNewProperty_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/AddNewProperty_NoDimensions.feature @@ -29,39 +29,39 @@ Feature: Add New Property | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original text"} | And the graph projection is fully up to date # Node /doc2 When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "other" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "other" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_Dimensions.feature index 9f92506bc50..2cdb0d682ed 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_Dimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_Dimensions.feature @@ -36,38 +36,38 @@ Feature: Change Property Value across dimensions; and test DimensionSpacePoints | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"ch"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document (in "de") When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original text"} | And the graph projection is fully up to date # Node /document (in "en") When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date @@ -138,11 +138,11 @@ Feature: Change Property Value across dimensions; and test DimensionSpacePoints # Node /document (in "ch") When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"ch"} | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date When I run the following node migration for workspace "live", creating content streams "migration-cs": @@ -186,11 +186,11 @@ Feature: Change Property Value across dimensions; and test DimensionSpacePoints # Node /document (in "ch") When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"ch"} | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date When I run the following node migration for workspace "live", creating content streams "migration-cs": diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_NoDimensions.feature index ff5861ebe27..4361221cc58 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/ChangePropertyValue_NoDimensions.feature @@ -29,27 +29,27 @@ Feature: Change Property | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original text"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_NodeName_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_NodeName_NoDimensions.feature index afd6f86f9d7..0c1c51ac250 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_NodeName_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_NodeName_NoDimensions.feature @@ -29,53 +29,53 @@ Feature: Filter - Node Name | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /name1 When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-name1" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-name1" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | nodeName | "name1" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original name1"} | And the graph projection is fully up to date # Node /name2 When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-name2" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-name2" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | nodeName | "name2" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original name2"} | And the graph projection is fully up to date # no node name When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-without-name" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-without-name" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "no node name"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyNotEmpty_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyNotEmpty_NoDimensions.feature index 2d4a80c8e67..d12326ac7c8 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyNotEmpty_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyNotEmpty_NoDimensions.feature @@ -29,65 +29,65 @@ Feature: Filter - Property not empty | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /name1 (has text value set) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-name1" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-name1" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | nodeName | "name1" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original name1"} | And the graph projection is fully up to date # Node /name2 (has text value empty) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-name2" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-name2" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | nodeName | "name2" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": ""} | And the graph projection is fully up to date # no node name (has text value not set) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-null-value" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-null-value" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": null} | And the graph projection is fully up to date # no node name (has text value not set) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-no-text" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-no-text" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyValue_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyValue_NoDimensions.feature index 09d3f5325f4..43e3652067a 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyValue_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/Filter_PropertyValue_NoDimensions.feature @@ -29,65 +29,65 @@ Feature: Filter - Property Value | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /name1 (has text value set) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-name1" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-name1" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | nodeName | "name1" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original name1"} | And the graph projection is fully up to date # Node /name2 (has text value2) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-name2" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-name2" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | nodeName | "name2" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "value2"} | And the graph projection is fully up to date # no node name (has text value not set) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-null-value" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-null-value" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": null} | And the graph projection is fully up to date # no node name (has text value not set) When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "na-no-text" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "na-no-text" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/MoveDimensionSpacePoint.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/MoveDimensionSpacePoint.feature index f6977481364..d35bd83c968 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/MoveDimensionSpacePoint.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/MoveDimensionSpacePoint.feature @@ -33,27 +33,27 @@ Feature: Move dimension space point | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"ch"},{"language":"de"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | And the graph projection is fully up to date @@ -95,11 +95,11 @@ Feature: Move dimension space point When the command DisableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language": "de"} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the graph projection is fully up to date # ensure the node is disabled diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_Dimensions.feature index e443f99aabd..7ead0f0df1b 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_Dimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_Dimensions.feature @@ -26,27 +26,27 @@ Feature: Adjust node types with a node migration | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"ch"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | And the graph projection is fully up to date ######################## diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_NoDimensions.feature index 86a2a02b204..e56502b7829 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/NodeTypeAdjustment_NoDimensions.feature @@ -24,27 +24,27 @@ Feature: Adjust node types with a node migration | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | And the graph projection is fully up to date ######################## diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveNodes_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveNodes_Dimensions.feature index 97c36ea5c6a..0f4ab5f1f92 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveNodes_Dimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveNodes_Dimensions.feature @@ -33,38 +33,38 @@ Feature: Remove Nodes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"gsw"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document (in "de") When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original text"} | And the graph projection is fully up to date # Node /document (in "en") When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveProperty_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveProperty_NoDimensions.feature index 51ad260d985..c2f14fb6447 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveProperty_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RemoveProperty_NoDimensions.feature @@ -29,27 +29,27 @@ Feature: Remove Property | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original text"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameNodeAggregate_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameNodeAggregate_Dimensions.feature index 424ba47f990..c9d0a75fa06 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameNodeAggregate_Dimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameNodeAggregate_Dimensions.feature @@ -33,39 +33,39 @@ Feature: Rename Node Aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"mul"},{"language":"de"},{"language":"en"},{"language":"ch"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document (in "de") When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | nodeName | "foo" | | originDimensionSpacePoint | {"language": "de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original text"} | And the graph projection is fully up to date # Node /document (in "en") When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"en"} | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameProperty_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameProperty_NoDimensions.feature index fd3943f7eb7..cf73ec538a5 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameProperty_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/RenameProperty_NoDimensions.feature @@ -29,27 +29,27 @@ Feature: Rename Property | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original text"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/StripTagsOnProperty_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/StripTagsOnProperty_NoDimensions.feature index 3e66a1e923a..45fb8fbff65 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/StripTagsOnProperty_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/EventSourced/Migration/StripTagsOnProperty_NoDimensions.feature @@ -29,27 +29,27 @@ Feature: Strip Tags on Property | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": "Original

text

"} | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeCopying/CopyNode_NoDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeCopying/CopyNode_NoDimensions.feature index b0c140417b5..47e14db17fd 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeCopying/CopyNode_NoDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeCopying/CopyNode_NoDimensions.feature @@ -13,45 +13,45 @@ Feature: Copy nodes (without dimensions) | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -62,13 +62,13 @@ Feature: Copy nodes (without dimensions) Then I expect node aggregate identifier "sir-nodeward-nodington-iii" to lead to node cs-identifier;sir-nodeward-nodington-iii;{} When the command CopyNodesRecursively is executed, copying the current node aggregate with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | targetDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | targetParentNodeAggregateIdentifier | "nody-mc-nodeface" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | targetParentNodeAggregateId | "nody-mc-nodeface" | | targetNodeName | "target-nn" | - | targetSucceedingSiblingNodeAggregateIdentifier | null | - | nodeAggregateIdentifierMapping | {"sir-nodeward-nodington-iii": "sir-nodeward-nodington-iii-copy"} | + | targetSucceedingSiblingnodeAggregateId | null | + | nodeAggregateIdMapping | {"sir-nodeward-nodington-iii": "sir-nodeward-nodington-iii-copy"} | And the graph projection is fully up to date Then I expect node aggregate identifier "sir-nodeward-nodington-iii-copy" to lead to node cs-identifier;sir-nodeward-nodington-iii-copy;{} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate.feature index ad704c1c894..f6332e9e466 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate.feature @@ -40,45 +40,45 @@ Feature: Move node to a new parent / within the current parent before a sibling | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:DocumentWithTetheredChildNode" | | originDimensionSpacePoint | {"market":"DE", "language":"de"} | | coveredDimensionSpacePoints | [{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {"market":"DE", "language":"de"} | | coveredDimensionSpacePoints | [{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "tethered" | | nodeAggregateClassification | "tethered" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"market":"DE", "language":"de"} | | coveredDimensionSpacePoints | [{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "esquire" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -86,117 +86,117 @@ Feature: Move node to a new parent / within the current parent before a sibling Scenario: Try to move a node in a non-existing content stream: When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "non-existing" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "non-existing" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" Scenario: Try to move a node of a non-existing node aggregate: When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "i-do-not-exist" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "i-do-not-exist" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" Scenario: Try to move a node of a root node aggregate: When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | dimensionSpacePoint | {"market":"DE", "language":"de"} | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateIsRoot" Scenario: Try to move a node of a tethered node aggregate: When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateIsTethered" Scenario: Try to move a node in a non-existing dimension space point: When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {"market": "nope", "language": "neither"} | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" Scenario: Try to move a node in a dimension space point the aggregate does not cover When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {"market": "DE", "language": "fr"} | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint" Scenario: Try to move existing node to a non-existing parent When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | newParentNodeAggregateIdentifier | "non-existing-parent-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | + | newParentNodeAggregateId | "non-existing-parent-identifier" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" Scenario: Try to move a node to a parent that already has a child node of the same name Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"market": "DE", "language": "de"} | | coveredDimensionSpacePoints | [{"market": "DE", "language": "de"}, {"market": "DE", "language": "gsw"}, {"market": "CH", "language": "de"}, {"market": "CH", "language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | newParentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "lady-eleonode-rootford" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeNameIsAlreadyCovered" Scenario: Move a node that has no name Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"market": "DE", "language": "de"} | | coveredDimensionSpacePoints | [{"market": "DE", "language": "de"}, {"market": "DE", "language": "gsw"}, {"market": "CH", "language": "de"}, {"market": "CH", "language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | newParentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "lady-eleonode-rootford" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"market": "DE", "language": "de"} And I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{"market":"DE","language":"de"} @@ -205,77 +205,77 @@ Feature: Move node to a new parent / within the current parent before a sibling Scenario: Try to move a node to a parent whose node type does not allow child nodes of the node's type Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"market": "DE", "language": "de"} | | coveredDimensionSpacePoints | [{"market": "DE", "language": "de"}, {"market": "DE", "language": "gsw"}, {"market": "CH", "language": "de"}, {"market": "CH", "language": "gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "other-document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | newParentNodeAggregateIdentifier | "nodewyn-tetherton" | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "nodewyn-tetherton" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeConstraintException" Scenario: Try to move a node to a parent whose parent's node type does not allow grand child nodes of the node's type Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {"market": "DE", "language": "de"} | | coveredDimensionSpacePoints | [{"market": "DE", "language": "de"}, {"market": "DE", "language": "gsw"}, {"market": "CH", "language": "de"}, {"market": "CH", "language": "gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "content" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | newParentNodeAggregateIdentifier | "nodewyn-tetherton" | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "nodewyn-tetherton" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeConstraintException" Scenario: Try to move existing node to a non-existing succeeding sibling When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | "i-do-not-exist" | + | nodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | "i-do-not-exist" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" Scenario: Try to move existing node to a non-existing preceding sibling When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | newPrecedingSiblingNodeAggregateIdentifier | "i-do-not-exist" | + | nodeAggregateId | "sir-david-nodenborough" | + | newPrecedingSiblingNodeAggregateId | "i-do-not-exist" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" Scenario: Try to move a node to one of its children When the command MoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | + | contentStreamId | "cs-identifier" | | dimensionSpacePoint | {"market": "DE", "language": "de"} | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | newParentNodeAggregateIdentifier | "nodewyn-tetherton" | + | nodeAggregateId | "sir-david-nodenborough" | + | newParentNodeAggregateId | "nodewyn-tetherton" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateIsDescendant" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature index 5ea1b6c7981..5b5997e7b0c 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature @@ -26,55 +26,55 @@ Feature: Move a node aggregate considering disable state but without content dim | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | parentNodeAggregateId | "sir-nodeward-nodington-iii" | | nodeName | "esquire-child" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -82,19 +82,19 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node disabled by one of its ancestors to a new parent that is enabled Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date # node aggregate occupation and coverage is not relevant without dimensions and thus not tested @@ -107,19 +107,19 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node disabled by itself to a new parent that is enabled Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | affectedDimensionSpacePoints | [{}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -129,19 +129,19 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that disables one of its descendants to a new parent that is enabled Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -152,24 +152,24 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that is disabled by one of its ancestors to a new parent that disables itself Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -179,23 +179,23 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that is disabled by itself to a new parent that disables itself Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -205,18 +205,18 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that is enabled to a new parent that disables itself Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -226,23 +226,23 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that disables any of its descendants to a new parent that disables itself Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -253,23 +253,23 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that is disabled by one of its ancestors to a new parent that is disabled by one of its ancestors Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "nodimus-prime" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "nodimus-prime" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -279,23 +279,23 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that is disabled by itself to a new parent that is disabled by one of its ancestors Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "nodimus-prime" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "nodimus-prime" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -305,23 +305,23 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that disables any of its descendants to a new parent that is disabled by one of its ancestors Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | affectedDimensionSpacePoints | [{}] | And the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "nodimus-prime" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "nodimus-prime" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" @@ -332,18 +332,18 @@ Feature: Move a node aggregate considering disable state but without content dim Scenario: Move a node that is enabled to a new parent that is disabled by one of its ancestors Given the event NodeAggregateWasDisabled was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | affectedDimensionSpacePoints | [{}] | When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "nodimus-prime" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "nodimus-prime" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateWithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateWithoutDimensions.feature index 8f8ae4a3541..88246361280 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateWithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateWithoutDimensions.feature @@ -21,45 +21,45 @@ Feature: Move a node without content dimensions | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -67,12 +67,12 @@ Feature: Move a node without content dimensions Scenario: Move a node to the end of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes @@ -104,12 +104,12 @@ Feature: Move a node without content dimensions Scenario: Move a node before one of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | "sir-david-nodenborough" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | "sir-david-nodenborough" | + | initiatingUserId | "user" | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes @@ -141,29 +141,29 @@ Feature: Move a node without content dimensions Scenario: Move a node to a new parent and the end of its children Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-abigail-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-abigail-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | parentNodeAggregateId | "sir-nodeward-nodington-iii" | | nodeName | "other-document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | initiatingUserId | "user" | Then I expect exactly 7 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 6 is of type "NodeAggregateWasMoved" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | nodeMoveMappings | [{"movedNodeOrigin":[],"newParentAssignments":{"d751713988987e9331980363e24189ce":{"nodeAggregateIdentifier":"sir-nodeward-nodington-iii","originDimensionSpacePoint":[]}},"newSucceedingSiblingAssignments":[]}] | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | + | nodeMoveMappings | [{"movedNodeOrigin":[],"newParentAssignments":{"d751713988987e9331980363e24189ce":{"nodeAggregateId":"sir-nodeward-nodington-iii","originDimensionSpacePoint":[]}},"newSucceedingSiblingAssignments":[]}] | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 5 nodes @@ -200,18 +200,18 @@ Feature: Move a node without content dimensions Scenario: Move a node to a new parent and before one of its children When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | newSucceedingSiblingNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "lady-eleonode-rootford" | + | newSucceedingSiblingNodeAggregateId | "sir-nodeward-nodington-iii" | + | initiatingUserId | "user" | Then I expect exactly 6 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 5 is of type "NodeAggregateWasMoved" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | nodeMoveMappings | [{"movedNodeOrigin":[],"newParentAssignments":{"d751713988987e9331980363e24189ce":{"nodeAggregateIdentifier":"lady-eleonode-rootford","originDimensionSpacePoint":[]}},"newSucceedingSiblingAssignments":{"d751713988987e9331980363e24189ce":{"nodeAggregateIdentifier":"sir-nodeward-nodington-iii","originDimensionSpacePoint":[]}}}] | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | + | nodeMoveMappings | [{"movedNodeOrigin":[],"newParentAssignments":{"d751713988987e9331980363e24189ce":{"nodeAggregateId":"lady-eleonode-rootford","originDimensionSpacePoint":[]}},"newSucceedingSiblingAssignments":{"d751713988987e9331980363e24189ce":{"nodeAggregateId":"sir-nodeward-nodington-iii","originDimensionSpacePoint":[]}}}] | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature index 968e8073127..3f736c5c177 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature @@ -22,85 +22,85 @@ Feature: Move a node with content dimensions | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "anthony-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "anthony-destinode" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document-a" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "berta-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document-b" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document-c" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | parentNodeAggregateId | "sir-nodeward-nodington-iii" | | nodeName | "child-document-n" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-abigail-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-abigail-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document2" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -108,12 +108,12 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate to a new parent before the first of its new siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | "anthony-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -129,21 +129,21 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate to a new parent before the first of its new siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "anthony-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "anthony-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | "anthony-destinode" | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | | relationDistributionStrategy | "gatherAll" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -168,12 +168,12 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate to a new parent before one of its new siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -190,20 +190,20 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate to a new parent before one of its siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "berta-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -230,20 +230,20 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate to a new parent after another of its new siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newPrecedingSiblingNodeAggregateIdentifier | "berta-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newPrecedingSiblingNodeAggregateId | "berta-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -269,20 +269,20 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate to a new parent after the last of its new siblings - with a predecessor which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -307,13 +307,13 @@ Feature: Move a node with content dimensions Scenario: Move a single node in a node aggregate to a new parent after the last of its new siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "de"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | null | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | null | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -335,13 +335,13 @@ Feature: Move a node with content dimensions Scenario: Move a node and its specializations in a node aggregate to a new parent after the last of its new siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "de"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | null | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newSucceedingSiblingNodeAggregateId | null | | relationDistributionStrategy | "gatherSpecializations" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -373,25 +373,25 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate to a new parent between siblings with different parents in other variants Given the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "berta-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | | dimensionSpacePoint | {"language": "gsw"} | - | newParentNodeAggregateIdentifier | "lady-abigail-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | null | + | newParentNodeAggregateId | "lady-abigail-nodenborough" | + | newSucceedingSiblingNodeAggregateId | null | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | "sir-david-nodenborough" | - | newPrecedingSiblingNodeAggregateIdentifier | "anthony-destinode" | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | + | newParentNodeAggregateId | "sir-david-nodenborough" | + | newPrecedingSiblingNodeAggregateId | "anthony-destinode" | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | | relationDistributionStrategy | "gatherAll" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -419,24 +419,24 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate between siblings with different parents in other variants (without explicit new parent) Given the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "berta-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | | dimensionSpacePoint | {"language": "gsw"} | - | newParentNodeAggregateIdentifier | "lady-abigail-nodenborough" | - | newSucceedingSiblingNodeAggregateIdentifier | null | + | newParentNodeAggregateId | "lady-abigail-nodenborough" | + | newSucceedingSiblingNodeAggregateId | null | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newPrecedingSiblingNodeAggregateIdentifier | "anthony-destinode" | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | + | newPrecedingSiblingNodeAggregateId | "anthony-destinode" | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | | relationDistributionStrategy | "gatherAll" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature index b0996289c5f..00f951030a5 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature @@ -22,75 +22,75 @@ Feature: Move a node with content dimensions | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "anthony-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "anthony-destinode" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document-a" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "berta-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document-b" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document-n" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document-c" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "mul"} | | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -98,12 +98,12 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate before the first of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | "anthony-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -119,21 +119,21 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate before the first of its siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "anthony-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "anthony-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | "anthony-destinode" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | | relationDistributionStrategy | "gatherAll" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -158,12 +158,12 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate before another of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -180,20 +180,20 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate before another of its siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "berta-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -220,20 +220,20 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate after another of its siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | null | - | newPrecedingSiblingNodeAggregateIdentifier | "berta-destinode" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newPrecedingSiblingNodeAggregateId | "berta-destinode" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -259,20 +259,20 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate after the last of its siblings - with a predecessor which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -297,12 +297,12 @@ Feature: Move a node with content dimensions Scenario: Move a single node before the first of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newSucceedingSiblingNodeAggregateIdentifier | "anthony-destinode" | + | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -329,12 +329,12 @@ Feature: Move a node with content dimensions Scenario: Move a single node between two of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -362,11 +362,11 @@ Feature: Move a node with content dimensions Scenario: Move a single node to the end of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | | relationDistributionStrategy | "scatter" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -393,12 +393,12 @@ Feature: Move a node with content dimensions Scenario: Move a node and its specializations before the first of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "de"} | - | newSucceedingSiblingNodeAggregateIdentifier | "anthony-destinode" | + | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | | relationDistributionStrategy | "gatherSpecializations" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -435,12 +435,12 @@ Feature: Move a node with content dimensions Scenario: Move a node and its specializations between two of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "de"} | - | newSucceedingSiblingNodeAggregateIdentifier | "berta-destinode" | + | newSucceedingSiblingNodeAggregateId | "berta-destinode" | | relationDistributionStrategy | "gatherSpecializations" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -479,11 +479,11 @@ Feature: Move a node with content dimensions Scenario: Move a node and its specializations to the end of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "de"} | | relationDistributionStrategy | "gatherSpecializations" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePropertyConversion/NodePropertyConversion.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePropertyConversion/NodePropertyConversion.feature index 52d4e596fff..ffa626aebb2 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePropertyConversion/NodePropertyConversion.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePropertyConversion/NodePropertyConversion.feature @@ -14,28 +14,28 @@ Feature: Node Property Conversion And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date Scenario: DateTime objects at Node Creation When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"dateProperty": "Date:1997-07-16T19:20:30+05:00"} | And the graph projection is fully up to date @@ -49,22 +49,22 @@ Feature: Node Property Conversion Scenario: DateTime objects at Node Property Updating When the command CreateNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"dateProperty": "Date:1997-07-16T19:20:30+05:00"} | And the graph projection is fully up to date When the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"dateProperty": "Date:1997-07-19T19:20:30+05:00"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/AllCommandsAreImplemented.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/AllCommandsAreImplemented.feature index 48a9cde21a3..0e266fe2c63 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/AllCommandsAreImplemented.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/AllCommandsAreImplemented.feature @@ -21,8 +21,8 @@ Feature: Publishing hide/show scenario of nodes And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I have the following NodeTypes configuration: """ @@ -40,40 +40,40 @@ Feature: Publishing hide/show scenario of nodes """ And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system" | + | initiatingUserId | "system" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": {"type": "string", "value": "Initial t1"}} | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | initialPropertyValues | {"text": {"type": "string", "value": "Initial t2"}} | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Image" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"image": {"type": "image", "value": "Initial image"}} | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -83,32 +83,32 @@ Feature: Publishing hide/show scenario of nodes | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # SETUP: hide two nodes in USER workspace Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the command DisableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the graph projection is fully up to date When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"nodeAggregateIdentifier": "sir-david-nodenborough", "contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | nodesToPublish | [{"nodeAggregateId": "sir-david-nodenborough", "contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}}] | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -125,18 +125,18 @@ Feature: Publishing hide/show scenario of nodes # BEFORE: ensure two nodes are hidden in live (and user WS) Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | # 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 graph projection is fully up to date @@ -144,33 +144,33 @@ Feature: Publishing hide/show scenario of nodes | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # SETUP: show two nodes in USER workspace Given the command EnableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Given the command EnableNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"nodeAggregateIdentifier": "sir-david-nodenborough", "contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}}] | - | initiatingUserIdentifier | "initiating-user-identifier" | - | contentStreamIdentifierForRemainingPart | "user-cs-identifier-modified" | + | nodesToPublish | [{"nodeAggregateId": "sir-david-nodenborough", "contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}}] | + | initiatingUserId | "initiating-user-identifier" | + | contentStreamIdForRemainingPart | "user-cs-identifier-modified" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -191,37 +191,37 @@ Feature: Publishing hide/show scenario of nodes # | Key | Value | ## | workspaceName | "user-test" | # | baseWorkspaceName | "live" | - # | newContentStreamIdentifier | "user-cs-identifier" | + # | newContentStreamId | "user-cs-identifier" | # And the graph projection is fully up to date # SETUP: change two node names in USER workspace #Given the command "ChangeNodeAggregateName" is executed with payload: # | Key | Value | - # | contentStreamIdentifier | "user-cs-identifier" | - # | nodeAggregateIdentifier | "sir-david-nodenborough" | + # | contentStreamId | "user-cs-identifier" | + # | nodeAggregateId | "sir-david-nodenborough" | # | newNodeName | "text1mod" | #Given the command "ChangeNodeAggregateName" is executed with payload: # | Key | Value | - # | contentStreamIdentifier | "user-cs-identifier" | - # | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + # | contentStreamId | "user-cs-identifier" | + # | nodeAggregateId | "sir-nodeward-nodington-iii" | # | newNodeName | "imagemod" | # And the graph projection is fully up to date # When the command PublishIndividualNodesFromWorkspace is executed with payload: # | Key | Value | # | workspaceName | "user-test" | - # | nodesToPublish | [{"nodeAggregateIdentifier": "sir-david-nodenborough", "contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}}] | + # | nodesToPublish | [{"nodeAggregateId": "sir-david-nodenborough", "contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}}] | #And the graph projection is fully up to date # When I am in the active content stream of workspace "live" and dimension space point {} ## Then I expect the node aggregate "lady-eleonode-rootford" to have the following child nodes: - # | Name | NodeAggregateIdentifier | + # | Name | nodeAggregateId | # | text1mod | sir-david-nodenborough | # | image | sir-nodeward-nodington-iii | # When I am in the active content stream of workspace "user-test" and dimension space point {} # Then I expect the node aggregate "lady-eleonode-rootford" to have the following child nodes: - # | Name | NodeAggregateIdentifier | + # | Name | nodeAggregateId | # | text1mod | sir-david-nodenborough | # | imagemod | sir-nodeward-nodington-iii | @@ -231,33 +231,33 @@ Feature: Publishing hide/show scenario of nodes | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # SETUP: remove two nodes in USER workspace When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"nodeAggregateIdentifier": "sir-david-nodenborough", "contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | nodesToPublish | [{"nodeAggregateId": "sir-david-nodenborough", "contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}}] | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -276,32 +276,32 @@ Feature: Publishing hide/show scenario of nodes | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # SETUP: remove two nodes in USER workspace When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | coveredDimensionSpacePoint | {} | | nodeVariantSelectionStrategy | "allVariants" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"nodeAggregateIdentifier": "sir-david-nodenborough", "contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | nodesToPublish | [{"nodeAggregateId": "sir-david-nodenborough", "contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}}] | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -320,35 +320,35 @@ Feature: Publishing hide/show scenario of nodes | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # SETUP: set two node references in USER workspace When the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceNodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "user-cs-identifier" | + | sourceNodeAggregateId | "sir-david-nodenborough" | | sourceOriginDimensionSpacePoint | {} | | referenceName | "referenceProperty" | | references | [{"target":"sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the command SetNodeReferences is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceNodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | sourceNodeAggregateId | "nody-mc-nodeface" | | sourceOriginDimensionSpacePoint | {} | | referenceName | "referenceProperty" | | references | [{"target":"sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"nodeAggregateIdentifier": "sir-david-nodenborough", "contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}}] | - | initiatingUserIdentifier | "initiating-user-identifier" | - | contentStreamIdentifierForRemainingPart | "user-cs-identifier-modified" | + | nodesToPublish | [{"nodeAggregateId": "sir-david-nodenborough", "contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}}] | + | initiatingUserId | "initiating-user-identifier" | + | contentStreamIdForRemainingPart | "user-cs-identifier-modified" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -384,37 +384,37 @@ Feature: Publishing hide/show scenario of nodes | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # SETUP: set two new nodes in USER workspace When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "new1-agg" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "new1-agg" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "foo" | - | initiatingUserIdentifier | "user-foo" | + | initiatingUserId | "user-foo" | When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "new2-agg" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "new2-agg" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "foo2" | - | initiatingUserIdentifier | "user-foo" | + | initiatingUserId | "user-foo" | And the graph projection is fully up to date When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"nodeAggregateIdentifier": "new1-agg", "contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}}] | - | initiatingUserIdentifier | "initiating-user-identifier" | - | contentStreamIdentifierForRemainingPart | "user-cs-identifier-modified" | + | nodesToPublish | [{"nodeAggregateId": "new1-agg", "contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}}] | + | initiatingUserId | "initiating-user-identifier" | + | contentStreamIdForRemainingPart | "user-cs-identifier-modified" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishAndDiscardIndividualNodes.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishAndDiscardIndividualNodes.feature index 50898e6223f..35a9ba1b5dd 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishAndDiscardIndividualNodes.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishAndDiscardIndividualNodes.feature @@ -14,8 +14,8 @@ Feature: Publishing and discard individual nodes (basics) And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And I have the following NodeTypes configuration: """ @@ -31,40 +31,40 @@ Feature: Publishing and discard individual nodes (basics) """ And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system" | + | initiatingUserId | "system" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"text": {"type": "string", "value": "Initial t1"}} | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | initialPropertyValues | {"text": {"type": "string", "value": "Initial t2"}} | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Image" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {"image": {"type": "string", "value": "Initial image"}} | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -74,31 +74,31 @@ Feature: Publishing and discard individual nodes (basics) | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # modify nodes in user WS And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified t1"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified t2"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | originDimensionSpacePoint | {} | | propertyValues | {"image": "Modified image"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date ################ @@ -109,9 +109,9 @@ Feature: Publishing and discard individual nodes (basics) When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "user" | - | contentStreamIdentifierForRemainingPart | "user-cs-identifier-remaining" | + | nodesToPublish | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | initiatingUserId | "user" | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -147,8 +147,8 @@ Feature: Publishing and discard individual nodes (basics) | Key | Value | | workspaceName | "user-test" | | nodesToPublish | [] | - | initiatingUserIdentifier | "user" | - | contentStreamIdentifierForRemainingPart | "user-cs-identifier-remaining" | + | initiatingUserId | "user" | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -183,9 +183,9 @@ Feature: Publishing and discard individual nodes (basics) When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToPublish | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-david-nodenborough"}, {"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "nody-mc-nodeface"}, {"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "user" | - | contentStreamIdentifierForRemainingPart | "user-cs-identifier-remaining" | + | nodesToPublish | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}, {"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "nody-mc-nodeface"}, {"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | initiatingUserId | "user" | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -225,9 +225,9 @@ Feature: Publishing and discard individual nodes (basics) When the command DiscardIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToDiscard | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "user" | - | newContentStreamIdentifier | "user-cs-identifier-new" | + | nodesToDiscard | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | initiatingUserId | "user" | + | newContentStreamId | "user-cs-identifier-new" | And the graph projection is fully up to date @@ -250,8 +250,8 @@ Feature: Publishing and discard individual nodes (basics) | Key | Value | | workspaceName | "user-test" | | nodesToDiscard | [] | - | initiatingUserIdentifier | "user" | - | newContentStreamIdentifier | "user-cs-identifier-new" | + | initiatingUserId | "user" | + | newContentStreamId | "user-cs-identifier-new" | And the graph projection is fully up to date When I am in the active content stream of workspace "user-test" and dimension space point {} @@ -272,9 +272,9 @@ Feature: Publishing and discard individual nodes (basics) When the command DiscardIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToDiscard | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-david-nodenborough"}, {"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "nody-mc-nodeface"}, {"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "user" | - | newContentStreamIdentifier | "user-cs-identifier-new" | + | nodesToDiscard | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}, {"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "nody-mc-nodeface"}, {"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | initiatingUserId | "user" | + | newContentStreamId | "user-cs-identifier-new" | And the graph projection is fully up to date When I am in the active content stream of workspace "user-test" and dimension space point {} @@ -296,8 +296,8 @@ Feature: Publishing and discard individual nodes (basics) When the command DiscardIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | nodesToDiscard | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "user" | + | nodesToDiscard | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | initiatingUserId | "user" | And the graph projection is fully up to date # live WS does not change because of a discard diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishMovedNodesWithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishMovedNodesWithoutDimensions.feature index f39dbcbdd8f..f89ad473bd5 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishMovedNodesWithoutDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodePublishing/PublishMovedNodesWithoutDimensions.feature @@ -20,45 +20,45 @@ Feature: Publishing moved nodes without dimensions And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -67,24 +67,24 @@ Feature: Publishing moved nodes without dimensions | Key | Value | | workspaceName | "user" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date Scenario: Publish the move of a node to the end of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | + | contentStreamId | "user-cs-identifier" | | dimensionSpacePoint | {} | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | null | - | initiatingUserIdentifier | "user" | + | nodeAggregateId | "sir-david-nodenborough" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | null | + | initiatingUserId | "user" | And the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user" | - | nodesToPublish | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-david-nodenborough"}] | - | initiatingUserIdentifier | "user" | + | nodesToPublish | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}] | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes @@ -116,17 +116,17 @@ Feature: Publishing moved nodes without dimensions Scenario: Publish the move of a node before one of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | null | - | newSucceedingSiblingNodeAggregateIdentifier | "sir-david-nodenborough" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | null | + | newSucceedingSiblingNodeAggregateId | "sir-david-nodenborough" | + | initiatingUserId | "user" | And the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user" | - | nodesToPublish | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-nodeward-nodington-iii"}] | - | initiatingUserIdentifier | "user" | + | nodesToPublish | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes @@ -158,27 +158,27 @@ Feature: Publishing moved nodes without dimensions Scenario: Publish the move of a node to a new parent and the end of its children Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-abigail-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-abigail-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | parentNodeAggregateId | "sir-nodeward-nodington-iii" | | nodeName | "other-document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iii" | + | initiatingUserId | "user" | And the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user" | - | nodesToPublish | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "sir-david-nodenborough"}] | - | initiatingUserIdentifier | "user" | + | nodesToPublish | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}] | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect the graph projection to consist of exactly 5 nodes @@ -215,17 +215,17 @@ Feature: Publishing moved nodes without dimensions Scenario: Publish the move of a node to a new parent and before one of its children When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {} | - | newParentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | newSucceedingSiblingNodeAggregateIdentifier | "sir-nodeward-nodington-iii" | - | initiatingUserIdentifier | "user" | + | newParentNodeAggregateId | "lady-eleonode-rootford" | + | newSucceedingSiblingNodeAggregateId | "sir-nodeward-nodington-iii" | + | initiatingUserId | "user" | And the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | workspaceName | "user" | - | nodesToPublish | [{"contentStreamIdentifier": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateIdentifier": "nody-mc-nodeface"}] | - | initiatingUserIdentifier | "user" | + | nodesToPublish | [{"contentStreamId": "user-cs-identifier", "dimensionSpacePoint": {}, "nodeAggregateId": "nody-mc-nodeface"}] | + | initiatingUserId | "user" | When the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateAfterDisabling.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateAfterDisabling.feature index a4ad59e423a..7fc4b0a80a4 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateAfterDisabling.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateAfterDisabling.feature @@ -21,23 +21,23 @@ Feature: Disable a node aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateIdentifier | nodeTypeName | parentNodeAggregateIdentifier | nodeName | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | | preceding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | preceding-document | | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | | succeeding-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | succeeding-document | | nody-mc-nodeface | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | child-document | And the command SetNodeReferences is executed with payload: | Key | Value | - | sourceNodeAggregateIdentifier | "preceding-nodenborough" | + | sourceNodeAggregateId | "preceding-nodenborough" | | referenceName | "references" | | references | [{"target": "sir-david-nodenborough"}] | And the graph projection is fully up to date @@ -45,23 +45,23 @@ Feature: Disable a node aggregate Scenario: Restore a hidden node by removing and recreating it Given the command DisableNodeAggregate is executed with payload: | Key | Value | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | And the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | affectedOccupiedDimensionSpacePoints | [{}] | | affectedCoveredDimensionSpacePoints | [{}] | And the graph projection is fully up to date When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document" | When the graph projection is fully up to date @@ -79,7 +79,7 @@ Feature: Disable a node aggregate When I am in content stream "cs-identifier" and dimension space point {} And VisibilityConstraints are set to "frontend" Then the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | lady-eleonode-rootford | | 1 | preceding-nodenborough | | 1 | sir-david-nodenborough | @@ -87,7 +87,7 @@ Feature: Disable a node aggregate | 1 | succeeding-nodenborough | And I expect node aggregate identifier "sir-david-nodenborough" and node path "document" to lead to node cs-identifier;sir-david-nodenborough;{} And the subtree for node aggregate "sir-david-nodenborough" with node types "" and 1 levels deep should be: - | Level | NodeAggregateIdentifier | + | Level | nodeAggregateId | | 0 | sir-david-nodenborough | | 1 | nody-mc-nodeface | And I expect node aggregate identifier "nody-mc-nodeface" and node path "document/child-document" to lead to node cs-identifier;nody-mc-nodeface;{} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateWithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateWithDimensions.feature index ebc8abd9086..26360a0eb67 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateWithDimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodeAggregateWithDimensions.feature @@ -17,47 +17,47 @@ Feature: Remove NodeAggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "live-cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "lady-eleonode-nodesworth" | | nodeTypeName | "Neos.ContentRepository:Root" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the graph projection is fully up to date # We have to add another node since root nodes are in all dimension space points and thus cannot be varied # Node /document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-nodesworth" | | nodeName | "document" | And the graph projection is fully up to date # We also want to add a child node to make sure it is correctly removed when the parent is removed # Node /document/child-document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "nody-mc-nodeface" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "nody-mc-nodeface" | | nodeName | "child-document" | And the graph projection is fully up to date And the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date ######################## @@ -66,11 +66,11 @@ Feature: Remove NodeAggregate Scenario: In LIVE workspace, removing a NodeAggregate removes all nodes completely When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect the graph projection to consist of exactly 1 node @@ -88,18 +88,18 @@ Feature: Remove NodeAggregate When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodesFromAggregate.wip b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodesFromAggregate.wip index 293db8b656b..b81a3cac23b 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodesFromAggregate.wip +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRemoval/RemoveNodesFromAggregate.wip @@ -28,47 +28,47 @@ Feature: Remove Nodes from Aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "live-cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "lady-eleonode-nodesworth" | | nodeTypeName | "Neos.ContentRepository:Root" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | # We have to add another node since root nodes are in all dimension space points and thus cannot be varied # Node /document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-nodesworth" | | nodeName | "document" | # We also want to add a child node to make sure it is correctly removed when the parent is removed # Node /document/child-document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "nody-mc-nodeface" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "nody-mc-nodeface" | | nodeName | "child-document" | # We also want to add a grandchild node to make sure it is correctly removed when the parent is removed # Node /document/child-document/grandchild-document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "nodimus-prime" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "nodimus-prime" | | nodeName | "grandchild-document" | And the graph projection is fully up to date @@ -78,16 +78,16 @@ Feature: Remove Nodes from Aggregate Scenario: (Exception) Trying to remove a non existing node should fail with an exception When the command RemoveNodesFromAggregate was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "non-existing-agg-identifier" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "non-existing-agg-identifier" | | dimensionSpacePointSet | [{"language":"de"},{"language":"gsw"}] | Then the last command should have thrown an exception of type "NodeAggregateNotFound" Scenario: (Exception) Trying to remove a node in a parent dimension without specializing the corresponding specialization dimension throw an exception When the command RemoveNodesFromAggregate was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"de"}] | Then the last command should have thrown an exception of type "SpecializedDimensionsMustBePartOfDimensionSpacePointSet" @@ -98,8 +98,8 @@ Feature: Remove Nodes from Aggregate Scenario: (1.A.a) In LIVE workspace, removing a node WITHOUT children leads also to removal of the node in the specializations of its dimension space point if specified When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | dimensionSpacePointSet | [{"language":"de"},{"language":"gsw"}] | And the graph projection is fully up to date @@ -123,8 +123,8 @@ Feature: Remove Nodes from Aggregate Scenario: (1.A.b) In LIVE workspace, removing a node WITHOUT children does not lead to removal of its generalization When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date @@ -154,8 +154,8 @@ Feature: Remove Nodes from Aggregate When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"de"}] | And the graph projection is fully up to date @@ -174,8 +174,8 @@ Feature: Remove Nodes from Aggregate Scenario: (1.B.b) In LIVE workspace, removing a node WITH children does not lead to the removal of their generalizations When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date @@ -203,13 +203,13 @@ Feature: Remove Nodes from Aggregate Scenario: (2.A.a) In USER workspace, removing a node WITHOUT children also leads to its removal in the specializations of its subgraph When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | dimensionSpacePointSet | [{"language":"de"}] | And the graph projection is fully up to date @@ -250,22 +250,22 @@ Feature: Remove Nodes from Aggregate Scenario: (2.A.b) In USER workspace, removing a node WITHOUT children does not lead to removal of the node in the parent dimension When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | | specializationIdentifier | "cdoc-identifier-gsw" | When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date @@ -300,14 +300,14 @@ Feature: Remove Nodes from Aggregate When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"de"},{"language":"gsw"}] | And the graph projection is fully up to date @@ -334,22 +334,22 @@ Feature: Remove Nodes from Aggregate Scenario: (2.B.b) In USER workspace, removing a node WITH children does not lead to removal of the node in the parent dimension When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | | specializationIdentifier | "doc-identifier-gsw" | When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/ChangeNodeAggregateName.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/ChangeNodeAggregateName.feature index 1f79dac9713..d0ccea03ddb 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/ChangeNodeAggregateName.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/ChangeNodeAggregateName.feature @@ -10,17 +10,17 @@ Feature: Change node name | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system" | + | initiatingUserId | "system" | | nodeAggregateClassification | "root" | And I have the following NodeTypes configuration: """ @@ -31,39 +31,39 @@ Feature: Change node name Scenario: Change node name of content node Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "dog" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date When the command "ChangeNodeAggregateName" is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | newNodeName | "cat" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | Then I expect exactly 4 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 3 is of type "NodeAggregateNameWasChanged" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | newNodeName | "cat" | Scenario: Change node name actually updates projection Given the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "dog" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -76,10 +76,10 @@ Feature: Change node name When the command "ChangeNodeAggregateName" is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | newNodeName | "cat" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_BasicErrorCases.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_BasicErrorCases.feature index 64f35577058..6f325a8e949 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_BasicErrorCases.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_BasicErrorCases.feature @@ -35,60 +35,60 @@ Feature: Change node aggregate type - basic error cases | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language": "de"}, {"language": "gsw"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "parent" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Scenario: Try to change the node aggregate type on a non-existing content stream When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "non-existing" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "non-existing" | + | nodeAggregateId | "sir-david-nodenborough" | | newNodeTypeName | "Neos.ContentRepository.Testing:ChildOfNodeTypeA" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" Scenario: Try to change the type on a non-existing node aggregate When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | newNodeTypeName | "Neos.ContentRepository.Testing:ChildOfNodeTypeA" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" Scenario: Try to change a node aggregate to a non existing type When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | newNodeTypeName | "Neos.ContentRepository.Testing:Undefined" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeTypeNotFound" Scenario: Try to change to a node type disallowed by the parent node @@ -102,22 +102,22 @@ Feature: Change node aggregate type - basic error cases """ When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "parent" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | newNodeTypeName | "Neos.ContentRepository.Testing:NodeTypeB" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeConstraintException" Scenario: Try to change to a node type that is not allowed by the grand parent aggregate inside an autocreated parent aggregate @@ -136,35 +136,35 @@ Feature: Change node aggregate type - basic error cases When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "parent2-na" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "parent2-na" | | nodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "parent2" | | initialPropertyValues | {} | - | tetheredDescendantNodeAggregateIdentifiers | {"autocreated": "autocreated-child"} | - | initiatingUserIdentifier | "user" | + | tetheredDescendantNodeAggregateIds | {"autocreated": "autocreated-child"} | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "autocreated-child" | + | parentNodeAggregateId | "autocreated-child" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | newNodeTypeName | "Neos.ContentRepository.Testing:NodeTypeB" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeConstraintException" Scenario: Try to change the node type of an auto created child node to anything other than defined: @@ -179,22 +179,22 @@ Feature: Change node aggregate type - basic error cases When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "parent2-na" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "parent2-na" | | nodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "parent2" | | initialPropertyValues | {} | - | tetheredDescendantNodeAggregateIdentifiers | {"autocreated": "nody-mc-nodeface"} | - | initiatingUserIdentifier | "user" | + | tetheredDescendantNodeAggregateIds | {"autocreated": "nody-mc-nodeface"} | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | newNodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeConstraintException" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_DeleteStrategy.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_DeleteStrategy.feature index f4c3efc7533..4897485e005 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_DeleteStrategy.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_DeleteStrategy.feature @@ -35,29 +35,29 @@ Feature: Change node aggregate type - behavior of DELETE strategy | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language": "de"}, {"language": "gsw"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "parent" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date @@ -72,21 +72,21 @@ Feature: Change node aggregate type - behavior of DELETE strategy """ When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | - | initiatingUserIdentifier | "user" | + | parentNodeAggregateId | "sir-david-nodenborough" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | newNodeTypeName | "Neos.ContentRepository.Testing:ParentNodeTypeB" | | strategy | "delete" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date # the type has changed @@ -122,34 +122,34 @@ Feature: Change node aggregate type - behavior of DELETE strategy """ When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "parent2-na" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "parent2-na" | | nodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "parent2" | - | tetheredDescendantNodeAggregateIdentifiers | {"autocreated": "autocreated-child"} | - | initiatingUserIdentifier | "user" | + | tetheredDescendantNodeAggregateIds | {"autocreated": "autocreated-child"} | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "autocreated-child" | + | parentNodeAggregateId | "autocreated-child" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "parent2-na" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "parent2-na" | | newNodeTypeName | "Neos.ContentRepository.Testing:ParentNodeTypeB" | | strategy | "delete" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date # the type has changed @@ -172,32 +172,32 @@ Feature: Change node aggregate type - behavior of DELETE strategy Scenario: Change node type successfully When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | newNodeTypeName | "Neos.ContentRepository.Testing:NodeTypeB" | | strategy | "delete" | - | initiatingUserIdentifier | "user" | - | tetheredDescendantNodeAggregateIdentifiers | { "child-of-type-b": "child-of-type-b-id"} | + | initiatingUserId | "user" | + | tetheredDescendantNodeAggregateIds | { "child-of-type-b": "child-of-type-b-id"} | And the graph projection is fully up to date # the type has changed @@ -228,33 +228,33 @@ Feature: Change node aggregate type - behavior of DELETE strategy """ When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | - | tetheredDescendantNodeAggregateIdentifiers | { "child-of-type-a": "child-of-type-a-id"} | + | initiatingUserId | "user" | + | tetheredDescendantNodeAggregateIds | { "child-of-type-a": "child-of-type-a-id"} | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | newNodeTypeName | "Neos.ContentRepository.Testing:NodeTypeB" | | strategy | "delete" | - | initiatingUserIdentifier | "user" | - | tetheredDescendantNodeAggregateIdentifiers | { "child-of-type-b": "child-of-type-b-id"} | + | initiatingUserId | "user" | + | tetheredDescendantNodeAggregateIds | { "child-of-type-b": "child-of-type-b-id"} | And the graph projection is fully up to date # the type has changed diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_HappyPathStrategy.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_HappyPathStrategy.feature index f6348b3b490..a3d24d51e2d 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_HappyPathStrategy.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRetyping/ChangeNodeAggregateType_HappyPathStrategy.feature @@ -36,29 +36,29 @@ Feature: Change node aggregate type - behavior of HAPPYPATH strategy | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language": "de"}, {"language": "gsw"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "parent" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date @@ -73,21 +73,21 @@ Feature: Change node aggregate type - behavior of HAPPYPATH strategy """ When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | - | initiatingUserIdentifier | "user" | + | parentNodeAggregateId | "sir-david-nodenborough" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | newNodeTypeName | "Neos.ContentRepository.Testing:ParentNodeTypeB" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeConstraintException" Scenario: Try to change to a node type that disallows already present grandchildren with the HAPPYPATH conflict resolution strategy @@ -113,66 +113,66 @@ Feature: Change node aggregate type - behavior of HAPPYPATH strategy """ When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "parent2-na" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "parent2-na" | | nodeTypeName | "Neos.ContentRepository.Testing:ParentNodeType" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "parent2" | - | tetheredDescendantNodeAggregateIdentifiers | {"autocreated": "autocreated-child"} | - | initiatingUserIdentifier | "user" | + | tetheredDescendantNodeAggregateIds | {"autocreated": "autocreated-child"} | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "autocreated-child" | + | parentNodeAggregateId | "autocreated-child" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "parent2-na" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "parent2-na" | | newNodeTypeName | "Neos.ContentRepository.Testing:ParentNodeTypeB" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | Then the last command should have thrown an exception of type "NodeConstraintException" Scenario: Change node type successfully When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | nodeTypeName | "Neos.ContentRepository.Testing:NodeTypeA" | | originDimensionSpacePoint | {"language":"de"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | initialPropertyValues | {} | - | initiatingUserIdentifier | "user" | - | tetheredDescendantNodeAggregateIdentifiers | { "child-of-type-a": "child-of-type-a-id"} | + | initiatingUserId | "user" | + | tetheredDescendantNodeAggregateIds | { "child-of-type-a": "child-of-type-a-id"} | And the graph projection is fully up to date When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command ChangeNodeAggregateType was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodea-identifier-de" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodea-identifier-de" | | newNodeTypeName | "Neos.ContentRepository.Testing:NodeTypeB" | | strategy | "happypath" | - | initiatingUserIdentifier | "user" | - | tetheredDescendantNodeAggregateIdentifiers | { "child-of-type-b": "child-of-type-b-id"} | + | initiatingUserId | "user" | + | tetheredDescendantNodeAggregateIds | { "child-of-type-b": "child-of-type-b-id"} | And the graph projection is fully up to date # the type has changed diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesAreConnectedToARootNodePerSubgraph.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesAreConnectedToARootNodePerSubgraph.feature index 4369ebd6b82..3b30edd0521 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesAreConnectedToARootNodePerSubgraph.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesAreConnectedToARootNodePerSubgraph.feature @@ -18,45 +18,45 @@ Feature: Run projection integrity violation detection regarding root connection | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date Scenario: Create a cycle When the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date And the event NodeAggregateWasMoved was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | - | nodeMoveMappings | [{"movedNodeOrigin": {"language":"de"}, "newParentAssignments": {"1041cc1fe1030c1a82ac24346f8c69a7": {"nodeAggregateIdentifier": "nody-mc-nodeface", "originDimensionSpacePoint": {"language":"de"}}, "67b30a9436c8470107f1b237a14dc638": {"nodeAggregateIdentifier": "nody-mc-nodeface", "originDimensionSpacePoint": {"language":"de"}}}, "newSucceedingSiblingAssignments": []}] | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | + | nodeMoveMappings | [{"movedNodeOrigin": {"language":"de"}, "newParentAssignments": {"1041cc1fe1030c1a82ac24346f8c69a7": {"nodeAggregateId": "nody-mc-nodeface", "originDimensionSpacePoint": {"language":"de"}}, "67b30a9436c8470107f1b237a14dc638": {"nodeAggregateId": "nody-mc-nodeface", "originDimensionSpacePoint": {"language":"de"}}}, "newSucceedingSiblingAssignments": []}] | | repositionNodesWithoutAssignments | [] | And the graph projection is fully up to date And I run integrity violation detection diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesCoverTheirOrigin.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesCoverTheirOrigin.feature index da52ef8d495..096ff345023 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesCoverTheirOrigin.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/AllNodesCoverTheirOrigin.feature @@ -17,38 +17,38 @@ Feature: Run projection integrity violation detection to find nodes that do not | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date Scenario: Create a node not covering its origin When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/IntactContentGraph.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/IntactContentGraph.feature index 5c97892015b..9f45f536d42 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/IntactContentGraph.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/IntactContentGraph.feature @@ -17,56 +17,56 @@ Feature: Create an intact content graph and run integrity violation detection | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | Scenario: Create an intact content graph When the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "child-document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-nodeward-nodington-iii" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"gsw"} | | coveredDimensionSpacePoints | [{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "esquire" | | nodeAggregateClassification | "tethered" | And the event NodeReferencesWereSet was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "nody-mc-nodeface" | | affectedSourceOriginDimensionSpacePoints | [{"language":"de"}] | | referenceName | "referenceProperty" | - | references | [{"targetNodeAggregateIdentifier":"sir-david-nodenborough", "properties":null}] | + | references | [{"targetNodeAggregateId":"sir-david-nodenborough", "properties":null}] | And the graph projection is fully up to date And I run integrity violation detection Then I expect the integrity violation detection result to contain exactly 0 errors diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregateIdentifiersAreUniquePerSubgraph.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregateIdentifiersAreUniquePerSubgraph.feature index 2e0a83a7504..a3053d53f3c 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregateIdentifiersAreUniquePerSubgraph.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregateIdentifiersAreUniquePerSubgraph.feature @@ -17,38 +17,38 @@ Feature: Create two nodes with the same node aggregate identifier in the same su | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date Scenario: Create two node variants in the same subgraph When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"gsw"} | | coveredDimensionSpacePoints | [{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyClassifiedPerContentStream.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyClassifiedPerContentStream.feature index bab85b8401a..37ae5c4a196 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyClassifiedPerContentStream.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyClassifiedPerContentStream.feature @@ -17,38 +17,38 @@ Feature: Run projection integrity violation detection regarding node aggregate c | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date Scenario: Create node variants of different type When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"gsw"} | | coveredDimensionSpacePoints | [{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "tethered" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyTypedPerContentStream.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyTypedPerContentStream.feature index 7e682652418..77bfc5d072c 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyTypedPerContentStream.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/NodeAggregatesAreConsistentlyTypedPerContentStream.feature @@ -19,38 +19,38 @@ Feature: Run projection integrity violation detection regarding node aggregate t | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date Scenario: Create node variants of different type When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:DocumentA" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:DocumentB" | | originDimensionSpacePoint | {"language":"gsw"} | | coveredDimensionSpacePoints | [{"language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/ReferenceIntegrityIsProvided.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/ReferenceIntegrityIsProvided.feature index feb1b6d9356..287df761b6f 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/ReferenceIntegrityIsProvided.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/ReferenceIntegrityIsProvided.feature @@ -17,36 +17,36 @@ Feature: Run integrity violation detection regarding reference relations | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "source-nodandaise" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date Scenario: Reference a non-existing node aggregate When the event NodeReferencesWereSet was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | affectedSourceOriginDimensionSpacePoints | [{"language":"de"}] | | referenceName | "referenceProperty" | - | references | [{"targetNodeAggregateIdentifier":"anthony-destinode", "properties":null}] | + | references | [{"targetNodeAggregateId":"anthony-destinode", "properties":null}] | And the graph projection is fully up to date And I run integrity violation detection Then I expect the integrity violation detection result to contain exactly 1 error @@ -55,20 +55,20 @@ Feature: Run integrity violation detection regarding reference relations Scenario: Reference a node aggregate not covering any of the DSPs the source does When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "anthony-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "anthony-destinode" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"fr"} | | coveredDimensionSpacePoints | [{"language":"fr"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeAggregateClassification | "regular" | And the event NodeReferencesWereSet was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | sourceNodeAggregateIdentifier | "source-nodandaise" | + | contentStreamId | "cs-identifier" | + | sourceNodeAggregateId | "source-nodandaise" | | affectedSourceOriginDimensionSpacePoints | [{"language":"de"}] | | referenceName | "referenceProperty" | - | references | [{"targetNodeAggregateIdentifier":"anthony-destinode", "properties":null}] | + | references | [{"targetNodeAggregateId":"anthony-destinode", "properties":null}] | And the graph projection is fully up to date And I run integrity violation detection Then I expect the integrity violation detection result to contain exactly 1 error diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/TetheredNodesAreNamed.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/TetheredNodesAreNamed.feature index 48d4e9cc05e..b0ed235f6b5 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/TetheredNodesAreNamed.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/ProjectionIntegrityViolationDetection/TetheredNodesAreNamed.feature @@ -17,25 +17,25 @@ Feature: Run projection integrity violation detection regarding naming of tether | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language":"de"},{"language":"gsw"}] | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -43,12 +43,12 @@ Feature: Run projection integrity violation detection regarding naming of tether Scenario: Create node variants of different type When the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | | coveredDimensionSpacePoints | [{"language":"de"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeAggregateClassification | "tethered" | And the graph projection is fully up to date And I run integrity violation detection diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DimensionMismatch.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DimensionMismatch.feature index 3d32099557c..b83a65c3b20 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DimensionMismatch.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DimensionMismatch.feature @@ -22,16 +22,16 @@ Feature: Dimension mismatch | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"language": "de"}, {"language": "en"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date @@ -39,17 +39,17 @@ Feature: Dimension mismatch # Node /document When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language": "en"} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | initiatingUserIdentifier | "user" | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | initiatingUserId | "user" | And the graph projection is fully up to date When I have the following content dimensions: | Identifier | Values | Generalizations | | language | en, de | en->de | Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | NODE_COVERS_GENERALIZATION_OR_PEERS | sir-david-nodenborough | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DisallowedChildNode.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DisallowedChildNode.feature index 5b31fed5bd4..e65dcd9a986 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DisallowedChildNode.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/DisallowedChildNode.feature @@ -29,37 +29,37 @@ Feature: Remove disallowed Child Nodes and grandchild nodes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | # Node /document And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | # Node /document/sub And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "subdoc" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "subdoc" | | nodeTypeName | "Neos.ContentRepository.Testing:SubDocument" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "sub" | | nodeAggregateClassification | "regular" | @@ -84,7 +84,7 @@ Feature: Remove disallowed Child Nodes and grandchild nodes Then I expect no needed structure adjustments for type "Neos.ContentRepository:Root" Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:SubDocument" Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | DISALLOWED_CHILD_NODE | sir-david-nodenborough | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" @@ -120,36 +120,36 @@ Feature: Remove disallowed Child Nodes and grandchild nodes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | # Node /document And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "tethered" | # Node /document/sub And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "subdoc" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "subdoc" | | nodeTypeName | "Neos.ContentRepository.Testing:SubDocument" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "sub" | | nodeAggregateClassification | "regular" | @@ -175,7 +175,7 @@ Feature: Remove disallowed Child Nodes and grandchild nodes Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:SubDocument": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | DISALLOWED_CHILD_NODE | subdoc | When I adjust the node structure for node type "Neos.ContentRepository.Testing:SubDocument" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/Properties.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/Properties.feature index 2990461e590..bab15453501 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/Properties.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/Properties.feature @@ -22,27 +22,27 @@ Feature: Properties | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date # Node /document When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | initiatingUserIdentifier | "user" | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" @@ -60,7 +60,7 @@ Feature: Properties myProp: ~ """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | OBSOLETE_PROPERTY | sir-david-nodenborough | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" @@ -79,7 +79,7 @@ Feature: Properties defaultValue: "foo" """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | MISSING_DEFAULT_VALUE | sir-david-nodenborough | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" @@ -102,11 +102,11 @@ Feature: Properties """ And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | originDimensionSpacePoint | {} | | propertyValues | {"otherProp": ""} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" @@ -123,14 +123,14 @@ Feature: Properties And the Event "NodePropertiesWereSet" was published to stream "Neos.ContentRepository:ContentStream:cs-identifier" with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | originDimensionSpacePoint | {} | | propertyValues | {"myProp": {"value": "original value", "type": "My\\Non\\Existing\\Class"}} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | NON_DESERIALIZABLE_PROPERTY | sir-david-nodenborough | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature index f56b63c55a0..81c225dbe69 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature @@ -30,51 +30,51 @@ Feature: Tethered Nodes integrity violations | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{"market":"DE", "language":"en"},{"market":"DE", "language":"de"},{"market":"DE", "language":"gsw"},{"market":"CH", "language":"en"},{"market":"CH", "language":"de"},{"market":"CH", "language":"gsw"}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | # We add a tethered child node to provide for test cases for node aggregates of that classification # Node /document/tethered-node And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodewyn-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | | nodeTypeName | "Neos.ContentRepository.Testing:Tethered" | | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateIdentifier | "sir-david-nodenborough" | + | parentNodeAggregateId | "sir-david-nodenborough" | | nodeName | "tethered-node" | | nodeAggregateClassification | "tethered" | # We add a tethered grandchild node to provide for test cases that this works recursively # Node /document/tethered-node/tethered-leaf And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodimer-tetherton" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | | nodeTypeName | "Neos.ContentRepository.Testing:TetheredLeaf" | | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateIdentifier | "nodewyn-tetherton" | + | parentNodeAggregateId | "nodewyn-tetherton" | | nodeName | "tethered-leaf" | | nodeAggregateClassification | "tethered" | And the graph projection is fully up to date @@ -89,7 +89,7 @@ Feature: Tethered Nodes integrity violations type: 'Neos.ContentRepository.Testing:Tethered' """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | TETHERED_NODE_MISSING | sir-david-nodenborough | @@ -131,7 +131,7 @@ Feature: Tethered Nodes integrity violations 'tethered-node': ~ """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | DISALLOWED_TETHERED_NODE | nodewyn-tetherton | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" @@ -148,6 +148,6 @@ Feature: Tethered Nodes integrity violations type: 'Neos.ContentRepository.Testing:TetheredLeaf' """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | TETHERED_NODE_TYPE_WRONG | nodewyn-tetherton | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodesReordering.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodesReordering.feature index a75f0ef9a14..dc7cea01e6d 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodesReordering.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodesReordering.feature @@ -23,28 +23,28 @@ Feature: Tethered Nodes Reordering Structure changes | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | - | tetheredDescendantNodeAggregateIdentifiers | {"tethered-node": "tethered-node-agg", "other-tethered-node": "other-tethered-node-agg", "third-tethered-node": "third-tethered-node-agg"} | - | initiatingUserIdentifier | "user" | + | tetheredDescendantNodeAggregateIds | {"tethered-node": "tethered-node-agg", "other-tethered-node": "other-tethered-node-agg", "third-tethered-node": "third-tethered-node-agg"} | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" @@ -66,7 +66,7 @@ Feature: Tethered Nodes Reordering Structure changes position: start """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | TETHERED_NODE_WRONGLY_ORDERED | sir-david-nodenborough | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/UnknownNodeType.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/UnknownNodeType.feature index 168d7fb50f8..26286cf4926 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/UnknownNodeType.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/UnknownNodeType.feature @@ -16,26 +16,26 @@ Feature: Unknown node types | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "system-user" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "system-user" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "system-user" | + | initiatingUserId | "system-user" | | nodeAggregateClassification | "root" | # Node /document And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "sir-david-nodenborough" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "document" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -48,7 +48,7 @@ Feature: Unknown node types 'Neos.Neos:FallbackNode': [] """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateIdentifier | + | Type | nodeAggregateId | | NODE_TYPE_MISSING | sir-david-nodenborough | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/RebasingAutoCreatedNodesWorks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/RebasingAutoCreatedNodesWorks.feature index d9d4935a24d..a0a79f138f5 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/RebasingAutoCreatedNodesWorks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/RebasingAutoCreatedNodesWorks.feature @@ -7,7 +7,7 @@ Feature: Rebasing auto-created nodes works - root workspace with a single "root" node inside. - then, a nested workspace user-test is created - In the user-test workspace, we create a new node with auto-created child nodes WITHOUT SPECIFYING THE - NESTED NODE IDENTIFIERS (tetheredDescendantNodeAggregateIdentifiers) + NESTED NODE IDENTIFIERS (tetheredDescendantNodeAggregateIds) - then, for the auto-created child node, set a property. - finally, try to rebase the whole thing. @@ -31,16 +31,16 @@ Feature: Rebasing auto-created nodes works And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | nodeAggregateClassification | "root" | And the graph projection is fully up to date @@ -48,21 +48,21 @@ Feature: Rebasing auto-created nodes works | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date Scenario: complex scenario (to reproduce the bug) -- see the feature description # USER workspace: create a new node with auto-created child nodes When the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | nodeName | "mcnodeface" | | originDimensionSpacePoint | {} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-rootford" | And the graph projection is fully up to date And I am in content stream "user-cs-identifier" and dimension space point {} Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node user-cs-identifier;nody-mc-nodeface;{} @@ -72,17 +72,17 @@ Feature: Rebasing auto-created nodes works # - then, for the auto-created child node, set a property. When the command "SetSerializedNodeProperties" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | $this->currentNodeAggregateIdentifier | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | $this->currentnodeAggregateId | | originDimensionSpacePoint | {} | | propertyValues | {"text": {"value":"Modified","type":"string"}} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # This should properly work; no error. diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/WorkspaceBasedContentPublishing.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/WorkspaceBasedContentPublishing.feature index 34a630307d7..0897c857478 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/WorkspaceBasedContentPublishing.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/WorkspacePublishing/WorkspaceBasedContentPublishing.feature @@ -18,97 +18,97 @@ Feature: Workspace based content publishing type: string """ And the command CreateRootWorkspace is executed with payload: - | Key | Value | - | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | workspaceName | "live" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | nodeTypeName | "Neos.ContentRepository.Testing:Content" | - | originDimensionSpacePoint | {} | - | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | - | nodeName | "child" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | + | nodeTypeName | "Neos.ContentRepository.Testing:Content" | + | originDimensionSpacePoint | {} | + | coveredDimensionSpacePoints | [{}] | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "child" | + | nodeAggregateClassification | "regular" | And the graph projection is fully up to date And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Original"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | # 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 graph projection is fully up to date And the command CreateWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | - | workspaceOwner | "owner-identifier" | + | Key | Value | + | workspaceName | "user-test" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | + | workspaceOwner | "owner-identifier" | And the graph projection is fully up to date Scenario: Basic events are emitted # LIVE workspace Then I expect exactly 4 events to be published on stream "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 0 is of type "ContentStreamWasCreated" with payload: - | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Expected | + | contentStreamId | "cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | # Event 1 is the root Node Created event (we can skip this here, it is tested somewhere else); Event 2 is the SetProperty Then I expect exactly 1 event to be published on stream "Neos.ContentRepository:Workspace:live" And event at index 0 is of type "RootWorkspaceWasCreated" with payload: - | Key | Expected | - | workspaceName | "live" | - | workspaceTitle | "Live" | - | workspaceDescription | "The workspace \"live\"" | - | initiatingUserIdentifier | "initiating-user-identifier" | - | newContentStreamIdentifier | "cs-identifier" | + | Key | Expected | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The workspace \"live\"" | + | initiatingUserId | "initiating-user-identifier" | + | newContentStreamId | "cs-identifier" | # USER workspace Then I expect exactly 1 event to be published on stream "Neos.ContentRepository:ContentStream:user-cs-identifier" And event at index 0 is of type "ContentStreamWasForked" with payload: - | Key | Expected | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Expected | + | newContentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | Then I expect exactly 1 event to be published on stream "Neos.ContentRepository:Workspace:user-test" And event at index 0 is of type "WorkspaceWasCreated" with payload: - | Key | Expected | - | workspaceName | "user-test" | - | baseWorkspaceName | "live" | - | workspaceTitle | "User-test" | - | workspaceDescription | "The workspace \"user-test\"" | - | initiatingUserIdentifier | "initiating-user-identifier" | - | newContentStreamIdentifier | "user-cs-identifier" | - | workspaceOwner | "owner-identifier" | + | Key | Expected | + | workspaceName | "user-test" | + | baseWorkspaceName | "live" | + | workspaceTitle | "User-test" | + | workspaceDescription | "The workspace \"user-test\"" | + | initiatingUserId | "initiating-user-identifier" | + | newContentStreamId | "user-cs-identifier" | + | workspaceOwner | "owner-identifier" | Scenario: modify the property in the nested workspace and publish afterwards works When the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -125,9 +125,9 @@ Feature: Workspace based content publishing # PUBLISHING When the command PublishWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -140,40 +140,40 @@ Feature: Workspace based content publishing When the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified in user workspace"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified in live workspace"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # PUBLISHING without rebase: error When the command PublishWorkspace is executed with payload and exceptions are caught: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | Then the last command should have thrown an exception of type "BaseWorkspaceHasBeenModifiedInTheMeantime" # REBASING + Publishing: works now (TODO soft constraint check for old value) When the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date And the command PublishWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -188,37 +188,37 @@ Feature: Workspace based content publishing When the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # PUBLISHING And the command PublishWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} When the command SetNodeProperties is executed with payload: - | Key | Value | - | contentStreamIdentifier | $this->contentStreamIdentifier | - | nodeAggregateIdentifier | "nody-mc-nodeface" | - | originDimensionSpacePoint | {} | - | propertyValues | {"text": "Modified anew"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | contentStreamId | $this->contentStreamId | + | nodeAggregateId | "nody-mc-nodeface" | + | originDimensionSpacePoint | {} | + | propertyValues | {"text": "Modified anew"} | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # PUBLISHING And the command PublishWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "live" and dimension space point {} @@ -230,11 +230,11 @@ Feature: Workspace based content publishing Scenario: Discarding a full workspace works When the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "user-test" and dimension space point {} @@ -245,10 +245,10 @@ Feature: Workspace based content publishing # Discarding When the command DiscardWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | - | newContentStreamIdentifier | "user-cs-identifier-modified" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | + | newContentStreamId | "user-cs-identifier-modified" | And the graph projection is fully up to date When I am in the active content stream of workspace "user-test" and dimension space point {} @@ -260,28 +260,28 @@ Feature: Workspace based content publishing Scenario: Discarding a full workspace shows the most up-to-date base workspace when the base WS was modified in the meantime When the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Modified in live workspace"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # Discarding When the command DiscardWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | - | newContentStreamIdentifier | "user-cs-identifier-modified" | + | Key | Value | + | workspaceName | "user-test" | + | initiatingUserId | "initiating-user-identifier" | + | newContentStreamId | "user-cs-identifier-modified" | And the graph projection is fully up to date When I am in the active content stream of workspace "user-test" and dimension space point {} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/NodeOperationsOnMultipleWorkspaces.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/NodeOperationsOnMultipleWorkspaces.feature index bc2d6d82eaf..d089eeea18e 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/NodeOperationsOnMultipleWorkspaces.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/NodeOperationsOnMultipleWorkspaces.feature @@ -14,71 +14,71 @@ Feature: Single Node operations on multiple workspaces/content streams; e.g. cop And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "user-identifier" | + | initiatingUserId | "user-identifier" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "child" | | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nodingers-cat" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodingers-cat" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "nody-mc-nodeface" | + | parentNodeAggregateId | "nody-mc-nodeface" | | nodeName | "pet" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date And the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Original"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date And the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date Scenario: Set property of a node Given the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Changed"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | Then I expect exactly 2 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:user-cs-identifier" And event at index 1 is of type "NodePropertiesWereSet" with payload: | Key | Expected | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | [] | | propertyValues.text.value | "Changed" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | When the graph projection is fully up to date And I am in the active content stream of workspace "live" and dimension space point {} diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/PruneContentStreams.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/PruneContentStreams.feature index 05dea93c91a..122ab3f3f79 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/PruneContentStreams.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/PruneContentStreams.feature @@ -11,15 +11,15 @@ Feature: If content streams are not in use anymore by the workspace, they can be And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "root-node" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "root-node" | | nodeTypeName | "Neos.ContentRepository:Root" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the graph projection is fully up to date Scenario: content streams are marked as IN_USE_BY_WORKSPACE properly after creation @@ -31,8 +31,8 @@ Feature: If content streams are not in use anymore by the workspace, they can be | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then the content stream "user-cs-identifier" has state "IN_USE_BY_WORKSPACE" @@ -42,13 +42,13 @@ Feature: If content streams are not in use anymore by the workspace, they can be | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I am in the active content stream of workspace "user-test" and dimension space point {} @@ -61,14 +61,14 @@ Feature: If content streams are not in use anymore by the workspace, they can be | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | - | rebasedContentStreamIdentifier | "user-cs-identifier-rebased" | + | initiatingUserId | "initiating-user-identifier" | + | rebasedContentStreamId | "user-cs-identifier-rebased" | And the graph projection is fully up to date # now, we have one unused content stream (the old content stream of the user-test workspace) @@ -87,13 +87,13 @@ Feature: If content streams are not in use anymore by the workspace, they can be | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date When the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date # now, we have one unused content stream (the old content stream of the user-test workspace) @@ -110,15 +110,15 @@ Feature: If content streams are not in use anymore by the workspace, they can be | Key | Value | | workspaceName | "review" | | baseWorkspaceName | "live" | - | newContentStreamIdentifier | "review-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "review-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date And the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "user-test" | | baseWorkspaceName | "review" | - | newContentStreamIdentifier | "user-cs-identifier" | - | initiatingUserIdentifier | "user" | + | newContentStreamId | "user-cs-identifier" | + | initiatingUserId | "user" | And the graph projection is fully up to date # now, we rebase the "review" workspace, effectively marking the "review-cs-identifier" content stream as NO_LONGER_IN_USE. @@ -127,7 +127,7 @@ Feature: If content streams are not in use anymore by the workspace, they can be When the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "review" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When I prune unused content streams diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodeAggregateWithDimensions.wip b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodeAggregateWithDimensions.wip index ebc8abd9086..26360a0eb67 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodeAggregateWithDimensions.wip +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodeAggregateWithDimensions.wip @@ -17,47 +17,47 @@ Feature: Remove NodeAggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "live-cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "lady-eleonode-nodesworth" | | nodeTypeName | "Neos.ContentRepository:Root" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | And the graph projection is fully up to date # We have to add another node since root nodes are in all dimension space points and thus cannot be varied # Node /document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-nodesworth" | | nodeName | "document" | And the graph projection is fully up to date # We also want to add a child node to make sure it is correctly removed when the parent is removed # Node /document/child-document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "nody-mc-nodeface" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "nody-mc-nodeface" | | nodeName | "child-document" | And the graph projection is fully up to date And the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date ######################## @@ -66,11 +66,11 @@ Feature: Remove NodeAggregate Scenario: In LIVE workspace, removing a NodeAggregate removes all nodes completely When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect the graph projection to consist of exactly 1 node @@ -88,18 +88,18 @@ Feature: Remove NodeAggregate When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | + | initiatingUserId | "initiating-user-identifier" | And the graph projection is fully up to date When the command RemoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "user" | + | initiatingUserId | "user" | And the graph projection is fully up to date Then I expect the graph projection to consist of exactly 4 nodes diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodesFromAggregate.wip b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodesFromAggregate.wip index 293db8b656b..b81a3cac23b 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodesFromAggregate.wip +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/RemoveNodesFromAggregate.wip @@ -28,47 +28,47 @@ Feature: Remove Nodes from Aggregate | workspaceName | "live" | | workspaceTitle | "Live" | | workspaceDescription | "The live workspace" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | newContentStreamIdentifier | "live-cs-identifier" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | newContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "lady-eleonode-nodesworth" | | nodeTypeName | "Neos.ContentRepository:Root" | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | # We have to add another node since root nodes are in all dimension space points and thus cannot be varied # Node /document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "lady-eleonode-nodesworth" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "lady-eleonode-nodesworth" | | nodeName | "document" | # We also want to add a child node to make sure it is correctly removed when the parent is removed # Node /document/child-document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "nody-mc-nodeface" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "nody-mc-nodeface" | | nodeName | "child-document" | # We also want to add a grandchild node to make sure it is correctly removed when the parent is removed # Node /document/child-document/grandchild-document And the command CreateNodeAggregateWithNodeAndSerializedProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | nodeTypeName | "Neos.ContentRepository.Testing:Document" | | originDimensionSpacePoint | {"language":"de"} | - | initiatingUserIdentifier | "00000000-0000-0000-0000-000000000000" | - | parentNodeAggregateIdentifier | "nodimus-prime" | + | initiatingUserId | "00000000-0000-0000-0000-000000000000" | + | parentNodeAggregateId | "nodimus-prime" | | nodeName | "grandchild-document" | And the graph projection is fully up to date @@ -78,16 +78,16 @@ Feature: Remove Nodes from Aggregate Scenario: (Exception) Trying to remove a non existing node should fail with an exception When the command RemoveNodesFromAggregate was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "non-existing-agg-identifier" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "non-existing-agg-identifier" | | dimensionSpacePointSet | [{"language":"de"},{"language":"gsw"}] | Then the last command should have thrown an exception of type "NodeAggregateNotFound" Scenario: (Exception) Trying to remove a node in a parent dimension without specializing the corresponding specialization dimension throw an exception When the command RemoveNodesFromAggregate was published with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"de"}] | Then the last command should have thrown an exception of type "SpecializedDimensionsMustBePartOfDimensionSpacePointSet" @@ -98,8 +98,8 @@ Feature: Remove Nodes from Aggregate Scenario: (1.A.a) In LIVE workspace, removing a node WITHOUT children leads also to removal of the node in the specializations of its dimension space point if specified When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | dimensionSpacePointSet | [{"language":"de"},{"language":"gsw"}] | And the graph projection is fully up to date @@ -123,8 +123,8 @@ Feature: Remove Nodes from Aggregate Scenario: (1.A.b) In LIVE workspace, removing a node WITHOUT children does not lead to removal of its generalization When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date @@ -154,8 +154,8 @@ Feature: Remove Nodes from Aggregate When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"de"}] | And the graph projection is fully up to date @@ -174,8 +174,8 @@ Feature: Remove Nodes from Aggregate Scenario: (1.B.b) In LIVE workspace, removing a node WITH children does not lead to the removal of their generalizations When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date @@ -203,13 +203,13 @@ Feature: Remove Nodes from Aggregate Scenario: (2.A.a) In USER workspace, removing a node WITHOUT children also leads to its removal in the specializations of its subgraph When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nodasaurus-rex" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nodasaurus-rex" | | dimensionSpacePointSet | [{"language":"de"}] | And the graph projection is fully up to date @@ -250,22 +250,22 @@ Feature: Remove Nodes from Aggregate Scenario: (2.A.b) In USER workspace, removing a node WITHOUT children does not lead to removal of the node in the parent dimension When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | | specializationIdentifier | "cdoc-identifier-gsw" | When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nodimus-prime" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nodimus-prime" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date @@ -300,14 +300,14 @@ Feature: Remove Nodes from Aggregate When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"de"},{"language":"gsw"}] | And the graph projection is fully up to date @@ -334,22 +334,22 @@ Feature: Remove Nodes from Aggregate Scenario: (2.B.b) In USER workspace, removing a node WITH children does not lead to removal of the node in the parent dimension When the command CreateNodeVariant is executed with payload: | Key | Value | - | contentStreamIdentifier | "live-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "live-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | sourceOrigin | {"language":"de"} | | targetOrigin | {"language":"gsw"} | | specializationIdentifier | "doc-identifier-gsw" | When the command "ForkContentStream" is executed with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | sourceContentStreamIdentifier | "live-cs-identifier" | + | contentStreamId | "user-cs-identifier" | + | sourceContentStreamId | "live-cs-identifier" | And the graph projection is fully up to date When the command RemoveNodesFromAggregate was published with payload: | Key | Value | - | contentStreamIdentifier | "user-cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "user-cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePointSet | [{"language":"gsw"}] | And the graph projection is fully up to date diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/SingleNodeOperationsOnLiveWorkspace.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/SingleNodeOperationsOnLiveWorkspace.feature index 2b07ca10129..1015a6a16db 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/SingleNodeOperationsOnLiveWorkspace.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/Workspaces/SingleNodeOperationsOnLiveWorkspace.feature @@ -16,25 +16,25 @@ Feature: Single Node operations on live workspace And the command CreateRootWorkspace is executed with payload: | Key | Value | | workspaceName | "live" | - | newContentStreamIdentifier | "cs-identifier" | - | initiatingUserIdentifier | "user-id" | + | newContentStreamId | "cs-identifier" | + | initiatingUserId | "user-id" | And the graph projection is fully up to date And the event RootNodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "lady-eleonode-rootford" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | | coveredDimensionSpacePoints | [{}] | - | initiatingUserIdentifier | "user-identifier" | + | initiatingUserId | "user-identifier" | | nodeAggregateClassification | "root" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | nodeTypeName | "Neos.ContentRepository.Testing:Content" | | originDimensionSpacePoint | {} | | coveredDimensionSpacePoints | [{}] | - | parentNodeAggregateIdentifier | "lady-eleonode-rootford" | + | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeName | "child" | | nodeAggregateClassification | "regular" | And the graph projection is fully up to date @@ -42,20 +42,20 @@ Feature: Single Node operations on live workspace Scenario: Set property of a node Given the command SetNodeProperties is executed with payload: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {} | | propertyValues | {"text": "Hello"} | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | Then I expect exactly 4 events to be published on stream with prefix "Neos.ContentRepository:ContentStream:cs-identifier" And event at index 3 is of type "NodePropertiesWereSet" with payload: | Key | Expected | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | [] | | propertyValues.text.value | "Hello" | - | initiatingUserIdentifier | "initiating-user-identifier" | + | initiatingUserId | "initiating-user-identifier" | When the graph projection is fully up to date And I am in the active content stream of workspace "live" and dimension space point {} @@ -67,8 +67,8 @@ Feature: Single Node operations on live workspace Scenario: Error on invalid dimension space point Given the command SetNodeProperties is executed with payload and exceptions are caught: | Key | Value | - | contentStreamIdentifier | "cs-identifier" | - | nodeAggregateIdentifier | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | originDimensionSpacePoint | {"not": "existing"} | | propertyValues | {"text": "Hello"} | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" diff --git a/Neos.ContentRepository.Core/Classes/Dimension/ConfigurationBasedContentDimensionSource.php b/Neos.ContentRepository.Core/Classes/Dimension/ConfigurationBasedContentDimensionSource.php index aa7f5d26e5a..7434732d151 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/ConfigurationBasedContentDimensionSource.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/ConfigurationBasedContentDimensionSource.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\Dimension; -use Neos\ContentRepository\Core\Dimension\Exception\ContentDimensionIdentifierIsInvalid; +use Neos\ContentRepository\Core\Dimension\Exception\ContentDimensionIdIsInvalid; use Neos\ContentRepository\Core\Dimension\Exception\ContentDimensionValueIsInvalid; use Neos\ContentRepository\Core\Dimension\Exception\ContentDimensionValuesAreInvalid; use Neos\ContentRepository\Core\Dimension\Exception\ContentDimensionValueSpecializationDepthIsInvalid; @@ -49,7 +49,7 @@ public function __construct(array $dimensionConfiguration) } /** - * @throws ContentDimensionIdentifierIsInvalid + * @throws ContentDimensionIdIsInvalid * @throws ContentDimensionValueIsInvalid * @throws ContentDimensionValueSpecializationDepthIsInvalid * @throws ContentDimensionValuesAreInvalid @@ -58,8 +58,8 @@ protected function initializeDimensions(): void { if (!empty($this->dimensionConfiguration)) { $this->contentDimensions = []; - foreach ($this->dimensionConfiguration as $rawDimensionIdentifier => $dimensionConfiguration) { - $dimensionIdentifier = new ContentDimensionIdentifier($rawDimensionIdentifier); + foreach ($this->dimensionConfiguration as $rawDimensionId => $dimensionConfiguration) { + $dimensionId = new ContentDimensionId($rawDimensionId); $values = []; $variationEdges = []; $additionalConfiguration = $dimensionConfiguration; @@ -78,8 +78,8 @@ protected function initializeDimensions(): void } unset($additionalConfiguration['values']); - $this->contentDimensions[$rawDimensionIdentifier] = new ContentDimension( - $dimensionIdentifier, + $this->contentDimensions[$rawDimensionId] = new ContentDimension( + $dimensionId, new ContentDimensionValues($values), new ContentDimensionValueVariationEdges($variationEdges), $additionalConfiguration @@ -107,13 +107,13 @@ protected function extractDimensionValuesAndVariations( $constraints = []; $additionalConfiguration = $configuration; if (isset($configuration['constraints'])) { - foreach ($configuration['constraints'] as $rawDimensionIdentifier => $currentConstraints) { + foreach ($configuration['constraints'] as $rawDimensionId => $currentConstraints) { $wildcardAllowed = true; $identifierRestrictions = []; - if (!is_string($rawDimensionIdentifier)) { + if (!is_string($rawDimensionId)) { throw new \InvalidArgumentException( 'Dimension combination constraints must be indexed by dimension name, ' - . $rawDimensionIdentifier . ' given.' + . $rawDimensionId . ' given.' ); } foreach ($currentConstraints as $rawDimensionValue => $allowed) { @@ -135,7 +135,7 @@ protected function extractDimensionValuesAndVariations( $identifierRestrictions[$rawDimensionValue] = $allowed; } } - $constraints[$rawDimensionIdentifier] = new ContentDimensionConstraints( + $constraints[$rawDimensionId] = new ContentDimensionConstraints( $wildcardAllowed, $identifierRestrictions ); @@ -169,23 +169,23 @@ protected function extractDimensionValuesAndVariations( } /** - * @throws ContentDimensionIdentifierIsInvalid + * @throws ContentDimensionIdIsInvalid * @throws ContentDimensionValueIsInvalid * @throws ContentDimensionValueSpecializationDepthIsInvalid * @throws ContentDimensionValuesAreInvalid */ - public function getDimension(ContentDimensionIdentifier $dimensionIdentifier): ?ContentDimension + public function getDimension(ContentDimensionId $dimensionId): ?ContentDimension { if (is_null($this->contentDimensions)) { $this->initializeDimensions(); } - return $this->contentDimensions[(string)$dimensionIdentifier] ?? null; + return $this->contentDimensions[(string)$dimensionId] ?? null; } /** * @return array - * @throws ContentDimensionIdentifierIsInvalid + * @throws ContentDimensionIdIsInvalid * @throws ContentDimensionValueIsInvalid * @throws ContentDimensionValueSpecializationDepthIsInvalid * @throws ContentDimensionValuesAreInvalid diff --git a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimension.php b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimension.php index f04a98aa1fb..a05061b6a6c 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimension.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimension.php @@ -47,7 +47,7 @@ final class ContentDimension * @internal */ public function __construct( - public readonly ContentDimensionIdentifier $identifier, + public readonly ContentDimensionId $id, public readonly ContentDimensionValues $values, ContentDimensionValueVariationEdges $variationEdges, /** General configuration like UI, detection etc. */ @@ -130,7 +130,7 @@ public function calculateSpecializationDepth( throw Exception\GeneralizationIsInvalid::becauseComparedValueIsNoSpecialization( $generalization, $specialization, - $this->identifier + $this->id ); } diff --git a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionConstraintSet.php b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionConstraintSet.php index 138f58d1d8f..57bf441e722 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionConstraintSet.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionConstraintSet.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Dimension; /** - * A set of content dimension constraints, indexed by dimension identifier + * A set of content dimension constraints, indexed by dimension id * * @implements \IteratorAggregate * @internal @@ -32,10 +32,10 @@ final class ContentDimensionConstraintSet implements \IteratorAggregate */ public function __construct(array $array) { - foreach ($array as $dimensionIdentifier => $constraints) { - if (!is_string($dimensionIdentifier) || empty($dimensionIdentifier)) { + foreach ($array as $dimensionId => $constraints) { + if (!is_string($dimensionId) || empty($dimensionId)) { throw new \InvalidArgumentException( - 'ContentDimensionConstraintSets must be indexed by dimension identifier', + 'ContentDimensionConstraintSets must be indexed by dimension id', 1639654304 ); } @@ -63,17 +63,17 @@ public function getIterator(): \ArrayIterator return new \ArrayIterator($this->constraints); } - public function getConstraints(ContentDimensionIdentifier $dimensionIdentifier): ?ContentDimensionConstraints + public function getConstraints(ContentDimensionId $dimensionId): ?ContentDimensionConstraints { - return $this->constraints[(string)$dimensionIdentifier] ?? null; + return $this->constraints[(string)$dimensionId] ?? null; } public function allowsCombinationWith( - ContentDimensionIdentifier $contentDimensionIdentifier, + ContentDimensionId $contentDimensionId, ContentDimensionValue $contentDimensionValue ): bool { - return isset($this->constraints[(string)$contentDimensionIdentifier]) - ? $this->constraints[(string)$contentDimensionIdentifier]->allowsCombinationWith($contentDimensionValue) + return isset($this->constraints[(string)$contentDimensionId]) + ? $this->constraints[(string)$contentDimensionId]->allowsCombinationWith($contentDimensionValue) : true; } } diff --git a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionIdentifier.php b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionId.php similarity index 54% rename from Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionIdentifier.php rename to Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionId.php index 5cccdd5ab92..e9ed6893e52 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionIdentifier.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionId.php @@ -14,38 +14,38 @@ namespace Neos\ContentRepository\Core\Dimension; -use Neos\ContentRepository\Core\Dimension\Exception\ContentDimensionIdentifierIsInvalid; +use Neos\ContentRepository\Core\Dimension\Exception\ContentDimensionIdIsInvalid; /** - * The content dimension identifier value object + * The content dimension id value object * * @api */ -final class ContentDimensionIdentifier implements \JsonSerializable, \Stringable +final class ContentDimensionId implements \JsonSerializable, \Stringable { /** - * @throws ContentDimensionIdentifierIsInvalid + * @throws ContentDimensionIdIsInvalid */ public function __construct( - public readonly string $identifier + public readonly string $id ) { - if (empty($identifier)) { - throw ContentDimensionIdentifierIsInvalid::becauseItMustNotBeEmpty(); + if (empty($id)) { + throw ContentDimensionIdIsInvalid::becauseItMustNotBeEmpty(); } } - public function equals(ContentDimensionIdentifier $other): bool + public function equals(ContentDimensionId $other): bool { - return $this->identifier === $other->identifier; + return $this->id === $other->id; } public function jsonSerialize(): string { - return $this->identifier; + return $this->id; } public function __toString(): string { - return $this->identifier; + return $this->id; } } diff --git a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionSourceInterface.php b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionSourceInterface.php index 6f3cc1c25a8..c03029b40d2 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionSourceInterface.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionSourceInterface.php @@ -24,7 +24,7 @@ interface ContentDimensionSourceInterface /** * Returns a content dimension by its identifier, if available */ - public function getDimension(ContentDimensionIdentifier $dimensionIdentifier): ?ContentDimension; + public function getDimension(ContentDimensionId $dimensionId): ?ContentDimension; /** * Returns all available content dimensions in correct order of priority, indexed by identifier diff --git a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionValue.php b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionValue.php index 607c172f8ed..b849fa5bff6 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionValue.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/ContentDimensionValue.php @@ -48,19 +48,14 @@ public function __construct( * @internal * @deprecated unused */ - public function getConstraints(ContentDimensionIdentifier $dimensionIdentifier): ?ContentDimensionConstraints + public function getConstraints(ContentDimensionId $dimensionId): ?ContentDimensionConstraints { - return $this->constraints->getConstraints($dimensionIdentifier); + return $this->constraints->getConstraints($dimensionId); } - public function canBeCombinedWith( - ContentDimensionIdentifier $dimensionIdentifier, - ContentDimensionValue $otherDimensionValue - ): bool { - return $this->constraints->allowsCombinationWith( - $dimensionIdentifier, - $otherDimensionValue - ); + public function canBeCombinedWith(ContentDimensionId $dimensionId, ContentDimensionValue $otherDimensionValue): bool + { + return $this->constraints->allowsCombinationWith($dimensionId, $otherDimensionValue); } public function getConfigurationValue(string $path): mixed diff --git a/Neos.ContentRepository.Core/Classes/Dimension/Exception/ContentDimensionIdentifierIsInvalid.php b/Neos.ContentRepository.Core/Classes/Dimension/Exception/ContentDimensionIdIsInvalid.php similarity index 78% rename from Neos.ContentRepository.Core/Classes/Dimension/Exception/ContentDimensionIdentifierIsInvalid.php rename to Neos.ContentRepository.Core/Classes/Dimension/Exception/ContentDimensionIdIsInvalid.php index 21c80dc51cf..44fe2822ffc 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/Exception/ContentDimensionIdentifierIsInvalid.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/Exception/ContentDimensionIdIsInvalid.php @@ -15,15 +15,15 @@ namespace Neos\ContentRepository\Core\Dimension\Exception; /** - * The exception to be thrown if an invalid content dimension identifier was attempted to be initialized + * The exception to be thrown if an invalid content dimension id was attempted to be initialized * @api */ -class ContentDimensionIdentifierIsInvalid extends \DomainException +class ContentDimensionIdIsInvalid extends \DomainException { public static function becauseItMustNotBeEmpty(): self { return new self( - 'Content dimension identifiers must not be empty.', + 'Content dimension id must not be empty.', 1515166615 ); } diff --git a/Neos.ContentRepository.Core/Classes/Dimension/Exception/GeneralizationIsInvalid.php b/Neos.ContentRepository.Core/Classes/Dimension/Exception/GeneralizationIsInvalid.php index 0113b792d34..0725a1bc68f 100644 --- a/Neos.ContentRepository.Core/Classes/Dimension/Exception/GeneralizationIsInvalid.php +++ b/Neos.ContentRepository.Core/Classes/Dimension/Exception/GeneralizationIsInvalid.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\Dimension\Exception; -use Neos\ContentRepository\Core\Dimension\ContentDimensionIdentifier; +use Neos\ContentRepository\Core\Dimension\ContentDimensionId; use Neos\ContentRepository\Core\Dimension\ContentDimensionValue; /** @@ -26,11 +26,11 @@ class GeneralizationIsInvalid extends \DomainException public static function becauseComparedValueIsNoSpecialization( ContentDimensionValue $value, ContentDimensionValue $comparedValue, - ContentDimensionIdentifier $dimensionIdentifier + ContentDimensionId $dimensionId ): self { return new self( '"' . $comparedValue . '" is no specialization of "' . $value - . '" in dimension "' . $dimensionIdentifier . '".' + . '" in dimension "' . $dimensionId . '".' ); } } diff --git a/Neos.ContentRepository.Core/Classes/DimensionSpace/AbstractDimensionSpacePoint.php b/Neos.ContentRepository.Core/Classes/DimensionSpace/AbstractDimensionSpacePoint.php index 54fd9e233b4..b7325232458 100644 --- a/Neos.ContentRepository.Core/Classes/DimensionSpace/AbstractDimensionSpacePoint.php +++ b/Neos.ContentRepository.Core/Classes/DimensionSpace/AbstractDimensionSpacePoint.php @@ -81,34 +81,34 @@ final protected static function validateCoordinates(array $coordinates): void */ final public function isDirectVariantInDimension( self $other, - Dimension\ContentDimensionIdentifier $contentDimensionIdentifier + Dimension\ContentDimensionId $contentDimensionId ): bool { - if (!$this->hasCoordinate($contentDimensionIdentifier) || !$other->hasCoordinate($contentDimensionIdentifier)) { + if (!$this->hasCoordinate($contentDimensionId) || !$other->hasCoordinate($contentDimensionId)) { return false; } if ( - $this->coordinates[(string)$contentDimensionIdentifier] - === $other->coordinates[(string)$contentDimensionIdentifier] + $this->coordinates[(string)$contentDimensionId] + === $other->coordinates[(string)$contentDimensionId] ) { return false; } $theseCoordinates = $this->coordinates; $otherCoordinates = $other->coordinates; - unset($theseCoordinates[(string)$contentDimensionIdentifier]); - unset($otherCoordinates[(string)$contentDimensionIdentifier]); + unset($theseCoordinates[(string)$contentDimensionId]); + unset($otherCoordinates[(string)$contentDimensionId]); return $theseCoordinates === $otherCoordinates; } - final public function hasCoordinate(Dimension\ContentDimensionIdentifier $dimensionIdentifier): bool + final public function hasCoordinate(Dimension\ContentDimensionId $dimensionId): bool { - return isset($this->coordinates[(string)$dimensionIdentifier]); + return isset($this->coordinates[(string)$dimensionId]); } - final public function getCoordinate(Dimension\ContentDimensionIdentifier $dimensionIdentifier): ?string + final public function getCoordinate(Dimension\ContentDimensionId $dimensionId): ?string { - return $this->coordinates[(string)$dimensionIdentifier] ?? null; + return $this->coordinates[(string)$dimensionId] ?? null; } /** diff --git a/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentDimensionZookeeper.php b/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentDimensionZookeeper.php index ee4a3bc9182..ed2a7c5e64e 100644 --- a/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentDimensionZookeeper.php +++ b/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentDimensionZookeeper.php @@ -41,9 +41,10 @@ protected function initializeAllowedCombinations(): void /** @var array> $dimensionCombinations */ $dimensionCombinations = []; foreach ($this->contentDimensionSource->getContentDimensionsOrderedByPriority() as $contentDimension) { + assert($contentDimension instanceof Dimension\ContentDimension); if (empty($dimensionCombinations)) { foreach ($contentDimension->values as $serializedValue => $dimensionValue) { - $dimensionCombinations[] = [(string)$contentDimension->identifier => $dimensionValue]; + $dimensionCombinations[] = [(string)$contentDimension->id => $dimensionValue]; } } else { $this->extendCombinationsWithDimension($dimensionCombinations, $contentDimension); @@ -66,14 +67,14 @@ protected function extendCombinationsWithDimension( foreach ($dimensionCombinations as $dimensionCombination) { /* @var $currentDimensionValue Dimension\ContentDimensionValue */ foreach ($contentDimension->values as $currentDimensionValue) { - foreach ($dimensionCombination as $otherDimensionIdentifier => $otherDimensionValue) { + foreach ($dimensionCombination as $otherDimensionId => $otherDimensionValue) { if ( !$currentDimensionValue->canBeCombinedWith( - new Dimension\ContentDimensionIdentifier($otherDimensionIdentifier), + new Dimension\ContentDimensionId($otherDimensionId), $otherDimensionValue ) || !$otherDimensionValue->canBeCombinedWith( - $contentDimension->identifier, + $contentDimension->id, $currentDimensionValue ) ) { @@ -81,7 +82,7 @@ protected function extendCombinationsWithDimension( } } $newDimensionCombination = $dimensionCombination; - $newDimensionCombination[(string)$contentDimension->identifier] = $currentDimensionValue; + $newDimensionCombination[(string)$contentDimension->id] = $currentDimensionValue; $currentDimensionCombinations[] = $newDimensionCombination; } } @@ -109,8 +110,8 @@ public function getAllowedDimensionSubspace(): DimensionSpacePointSet foreach ($this->getAllowedCombinations() as $dimensionCombination) { $coordinates = []; - foreach ($dimensionCombination as $contentDimensionIdentifier => $contentDimensionValue) { - $coordinates[$contentDimensionIdentifier] = (string)$contentDimensionValue; + foreach ($dimensionCombination as $contentDimensionId => $contentDimensionValue) { + $coordinates[$contentDimensionId] = (string)$contentDimensionValue; } $point = DimensionSpacePoint::fromArray($coordinates); diff --git a/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentSubgraphVariationWeight.php b/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentSubgraphVariationWeight.php index 2158b64805d..deba8eedf58 100644 --- a/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentSubgraphVariationWeight.php +++ b/Neos.ContentRepository.Core/Classes/DimensionSpace/ContentSubgraphVariationWeight.php @@ -38,7 +38,7 @@ public function __construct( */ public readonly array $weight ) { - foreach ($weight as $dimensionIdentifier => $specializationDepth) { + foreach ($weight as $dimensionId => $specializationDepth) { if (!$specializationDepth instanceof Dimension\ContentDimensionValueSpecializationDepth) { throw new \InvalidArgumentException( sprintf( @@ -52,9 +52,9 @@ public function __construct( } public function getWeightInDimension( - Dimension\ContentDimensionIdentifier $dimensionIdentifier + Dimension\ContentDimensionId $dimensionId ): ?Dimension\ContentDimensionValueSpecializationDepth { - return $this->weight[(string)$dimensionIdentifier] ?? null; + return $this->weight[(string)$dimensionId] ?? null; } public function canBeComparedTo(ContentSubgraphVariationWeight $other): bool @@ -71,14 +71,14 @@ public function decreaseBy(ContentSubgraphVariationWeight $other): ContentSubgra throw Exception\ContentSubgraphVariationWeightsAreIncomparable::butWereAttemptedTo($this, $other); } $decreasedWeight = []; - foreach ($this->weight as $rawDimensionIdentifier => $weight) { - $dimensionIdentifier = new Dimension\ContentDimensionIdentifier($rawDimensionIdentifier); + foreach ($this->weight as $rawDimensionId => $weight) { + $dimensionId = new Dimension\ContentDimensionId($rawDimensionId); /** * @var Dimension\ContentDimensionValueSpecializationDepth $otherWeight * Null is already excluded by canBeComparedTo above */ - $otherWeight = $other->getWeightInDimension($dimensionIdentifier); - $decreasedWeight[$rawDimensionIdentifier] = $weight->decreaseBy($otherWeight); + $otherWeight = $other->getWeightInDimension($dimensionId); + $decreasedWeight[$rawDimensionId] = $weight->decreaseBy($otherWeight); } return new ContentSubgraphVariationWeight($decreasedWeight); @@ -88,7 +88,7 @@ public function normalize(int $normalizationBase): int { $normalizedWeight = 0; $exponent = count($this->weight) - 1; - foreach ($this->weight as $dimensionIdentifier => $specializationDepth) { + foreach ($this->weight as $dimensionId => $specializationDepth) { $normalizedWeight += pow($normalizationBase, $exponent) * $specializationDepth->depth; $exponent--; } diff --git a/Neos.ContentRepository.Core/Classes/DimensionSpace/DimensionSpacePoint.php b/Neos.ContentRepository.Core/Classes/DimensionSpace/DimensionSpacePoint.php index 7b8823e3caf..760bb176549 100644 --- a/Neos.ContentRepository.Core/Classes/DimensionSpace/DimensionSpacePoint.php +++ b/Neos.ContentRepository.Core/Classes/DimensionSpace/DimensionSpacePoint.php @@ -87,10 +87,10 @@ final public static function fromUriRepresentation(string $encoded): self /** * Varies a dimension space point in a single coordinate */ - final public function vary(Dimension\ContentDimensionIdentifier $dimensionIdentifier, string $value): self + final public function vary(Dimension\ContentDimensionId $dimensionId, string $value): self { $variedCoordinates = $this->coordinates; - $variedCoordinates[(string)$dimensionIdentifier] = $value; + $variedCoordinates[(string)$dimensionId] = $value; return self::instance($variedCoordinates); } diff --git a/Neos.ContentRepository.Core/Classes/DimensionSpace/InterDimensionalVariationGraph.php b/Neos.ContentRepository.Core/Classes/DimensionSpace/InterDimensionalVariationGraph.php index cea4eadf260..c777920ea16 100644 --- a/Neos.ContentRepository.Core/Classes/DimensionSpace/InterDimensionalVariationGraph.php +++ b/Neos.ContentRepository.Core/Classes/DimensionSpace/InterDimensionalVariationGraph.php @@ -163,13 +163,13 @@ protected function initializeVariations(): void = $generalization->weight->normalize($this->determineWeightNormalizationBase()); } - foreach ($generalization->dimensionValues as $rawDimensionIdentifier => $contentDimensionValue) { - $dimensionIdentifier = new Dimension\ContentDimensionIdentifier($rawDimensionIdentifier); + foreach ($generalization->dimensionValues as $rawDimensionId => $contentDimensionValue) { + $dimensionId = new Dimension\ContentDimensionId($rawDimensionId); /** @var Dimension\ContentDimension $dimension */ - $dimension = $this->contentDimensionSource->getDimension($dimensionIdentifier); + $dimension = $this->contentDimensionSource->getDimension($dimensionId); foreach ($dimension->getSpecializations($contentDimensionValue) as $specializedValue) { $specializedDimensionSpacePoint = $generalization->dimensionSpacePoint - ->vary($dimensionIdentifier, (string)$specializedValue); + ->vary($dimensionId, (string)$specializedValue); if ( !$this->contentDimensionZookeeper->getAllowedDimensionSubspace() ->contains($specializedDimensionSpacePoint) diff --git a/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryFactory.php b/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryFactory.php index d12e9ac1671..5fb77282f4f 100644 --- a/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryFactory.php +++ b/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryFactory.php @@ -44,7 +44,7 @@ final class ContentRepositoryFactory private Projections $projections; public function __construct( - ContentRepositoryIdentifier $contentRepositoryIdentifier, + ContentRepositoryId $contentRepositoryId, EventStoreInterface $eventStore, NodeTypeManager $nodeTypeManager, ContentDimensionSourceInterface $contentDimensionSource, @@ -59,7 +59,7 @@ public function __construct( ); $this->projectionFactoryDependencies = new ProjectionFactoryDependencies( - $contentRepositoryIdentifier, + $contentRepositoryId, $eventStore, new EventNormalizer(), $nodeTypeManager, diff --git a/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryIdentifier.php b/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryId.php similarity index 97% rename from Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryIdentifier.php rename to Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryId.php index 86c1b9fba19..2394319cbc4 100644 --- a/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryIdentifier.php +++ b/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryId.php @@ -19,7 +19,7 @@ * * @api */ -final class ContentRepositoryIdentifier +final class ContentRepositoryId { private function __construct( public readonly string $value diff --git a/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryServiceFactoryDependencies.php b/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryServiceFactoryDependencies.php index ebc0a648858..7f6150b4c82 100644 --- a/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryServiceFactoryDependencies.php +++ b/Neos.ContentRepository.Core/Classes/Factory/ContentRepositoryServiceFactoryDependencies.php @@ -33,7 +33,7 @@ final class ContentRepositoryServiceFactoryDependencies { private function __construct( // These properties are from ProjectionFactoryDependencies - public readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + public readonly ContentRepositoryId $contentRepositoryId, public readonly EventStoreInterface $eventStore, public readonly EventNormalizer $eventNormalizer, public readonly NodeTypeManager $nodeTypeManager, @@ -57,7 +57,7 @@ public static function create( EventPersister $eventPersister, ): self { return new self( - $projectionFactoryDependencies->contentRepositoryIdentifier, + $projectionFactoryDependencies->contentRepositoryId, $projectionFactoryDependencies->eventStore, $projectionFactoryDependencies->eventNormalizer, $projectionFactoryDependencies->nodeTypeManager, diff --git a/Neos.ContentRepository.Core/Classes/Factory/ProjectionFactoryDependencies.php b/Neos.ContentRepository.Core/Classes/Factory/ProjectionFactoryDependencies.php index 028a02d05ee..606d8576c97 100644 --- a/Neos.ContentRepository.Core/Classes/Factory/ProjectionFactoryDependencies.php +++ b/Neos.ContentRepository.Core/Classes/Factory/ProjectionFactoryDependencies.php @@ -20,7 +20,7 @@ use Neos\ContentRepository\Core\EventStore\EventNormalizer; use Neos\ContentRepository\Core\Infrastructure\Property\PropertyConverter; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\EventStore\EventStoreInterface; /** @@ -29,7 +29,7 @@ final class ProjectionFactoryDependencies { public function __construct( - public readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + public readonly ContentRepositoryId $contentRepositoryId, public readonly EventStoreInterface $eventStore, public readonly EventNormalizer $eventNormalizer, public readonly NodeTypeManager $nodeTypeManager, diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php b/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php index f7bfc7b8e2d..f5c7a66f89a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php @@ -42,7 +42,7 @@ use Neos\ContentRepository\Core\Feature\NodeVariation\Exception\DimensionSpacePointIsAlreadyOccupied; use Neos\ContentRepository\Core\Infrastructure\Property\PropertyType; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; @@ -52,7 +52,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraintsWithSubNodeTypes; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * @internal implementation details of command handlers @@ -64,16 +64,16 @@ abstract protected function getNodeTypeManager(): NodeTypeManager; abstract protected function getAllowedDimensionSubspace(): DimensionSpacePointSet; /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @throws ContentStreamDoesNotExistYet */ protected function requireContentStreamToExist( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, ContentRepository $contentRepository ): void { - if (!$contentRepository->getContentStreamFinder()->hasContentStream($contentStreamIdentifier)) { + if (!$contentRepository->getContentStreamFinder()->hasContentStream($contentStreamId)) { throw new ContentStreamDoesNotExistYet( - 'Content stream "' . $contentStreamIdentifier . '" does not exist yet.', + 'Content stream "' . $contentStreamId . '" does not exist yet.', 1521386692 ); } @@ -214,23 +214,23 @@ protected function requireNodeTypeToAllowNodesOfTypeInReference( /** * NodeType and NodeName must belong together to the same node, which is the to-be-checked one. * - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @param NodeType $nodeType * @param NodeName|null $nodeName - * @param array|NodeAggregateIdentifier[] $parentNodeAggregateIdentifiers + * @param array|NodeAggregateId[] $parentNodeAggregateIds * @throws NodeConstraintException */ protected function requireConstraintsImposedByAncestorsAreMet( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeType $nodeType, ?NodeName $nodeName, - array $parentNodeAggregateIdentifiers, + array $parentNodeAggregateIds, ContentRepository $contentRepository ): void { - foreach ($parentNodeAggregateIdentifiers as $parentNodeAggregateIdentifier) { + foreach ($parentNodeAggregateIds as $parentNodeAggregateId) { $parentAggregate = $this->requireProjectedNodeAggregate( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $contentStreamId, + $parentNodeAggregateId, $contentRepository ); try { @@ -243,8 +243,8 @@ protected function requireConstraintsImposedByAncestorsAreMet( foreach ( $contentRepository->getContentGraph()->findParentNodeAggregates( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier + $contentStreamId, + $parentNodeAggregateId ) as $grandParentNodeAggregate ) { /* @var $grandParentNodeAggregate NodeAggregate */ @@ -355,18 +355,18 @@ protected function areNodeTypeConstraintsImposedByGrandparentValid( * @throws NodeAggregateCurrentlyDoesNotExist */ protected function requireProjectedNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository ): NodeAggregate { - $nodeAggregate = $contentRepository->getContentGraph()->findNodeAggregateByIdentifier( - $contentStreamIdentifier, - $nodeAggregateIdentifier + $nodeAggregate = $contentRepository->getContentGraph()->findNodeAggregateById( + $contentStreamId, + $nodeAggregateId ); if (!$nodeAggregate) { throw new NodeAggregateCurrentlyDoesNotExist( - 'Node aggregate "' . $nodeAggregateIdentifier . '" does currently not exist.', + 'Node aggregate "' . $nodeAggregateId . '" does currently not exist.', 1541678486 ); } @@ -379,18 +379,18 @@ protected function requireProjectedNodeAggregate( * @throws NodeAggregateCurrentlyExists */ protected function requireProjectedNodeAggregateToNotExist( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository ): void { - $nodeAggregate = $contentRepository->getContentGraph()->findNodeAggregateByIdentifier( - $contentStreamIdentifier, - $nodeAggregateIdentifier + $nodeAggregate = $contentRepository->getContentGraph()->findNodeAggregateById( + $contentStreamId, + $nodeAggregateId ); if ($nodeAggregate) { throw new NodeAggregateCurrentlyExists( - 'Node aggregate "' . $nodeAggregateIdentifier . '" does currently exist, but should not.', + 'Node aggregate "' . $nodeAggregateId . '" does currently exist, but should not.', 1541687645 ); } @@ -400,23 +400,23 @@ protected function requireProjectedNodeAggregateToNotExist( * @throws NodeAggregateCurrentlyDoesNotExist */ public function requireProjectedParentNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint, ContentRepository $contentRepository ): NodeAggregate { $parentNodeAggregate = $contentRepository->getContentGraph() ->findParentNodeAggregateByChildOriginDimensionSpacePoint( - $contentStreamIdentifier, - $childNodeAggregateIdentifier, + $contentStreamId, + $childNodeAggregateId, $childOriginDimensionSpacePoint ); if (!$parentNodeAggregate) { throw new NodeAggregateCurrentlyDoesNotExist( - 'Parent node aggregate for ' . $childNodeAggregateIdentifier + 'Parent node aggregate for ' . $childNodeAggregateId . ' does currently not exist in origin dimension space point ' . $childOriginDimensionSpacePoint - . ' and content stream ' . $contentStreamIdentifier, + . ' and content stream ' . $contentStreamId, 1645368685 ); } @@ -433,7 +433,7 @@ protected function requireNodeAggregateToCoverDimensionSpacePoint( ): void { if (!$nodeAggregate->coversDimensionSpacePoint($dimensionSpacePoint)) { throw new NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint( - 'Node aggregate "' . $nodeAggregate->nodeAggregateIdentifier + 'Node aggregate "' . $nodeAggregate->nodeAggregateId . '" does currently not cover dimension space point ' . json_encode($dimensionSpacePoint) . '.', 1541678877 @@ -450,7 +450,7 @@ protected function requireNodeAggregateToCoverDimensionSpacePoints( ): void { if (!$dimensionSpacePointSet->getDifference($nodeAggregate->coveredDimensionSpacePoints)->isEmpty()) { throw NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet::butWasSupposedTo( - $nodeAggregate->nodeAggregateIdentifier, + $nodeAggregate->nodeAggregateId, $dimensionSpacePointSet, $nodeAggregate->coveredDimensionSpacePoints ); @@ -464,7 +464,7 @@ protected function requireNodeAggregateToNotBeRoot(NodeAggregate $nodeAggregate) { if ($nodeAggregate->classification->isRoot()) { throw new NodeAggregateIsRoot( - 'Node aggregate "' . $nodeAggregate->nodeAggregateIdentifier . '" is classified as root.', + 'Node aggregate "' . $nodeAggregate->nodeAggregateId . '" is classified as root.', 1554586860 ); } @@ -477,7 +477,7 @@ protected function requireNodeAggregateToBeUntethered(NodeAggregate $nodeAggrega { if ($nodeAggregate->classification->isTethered()) { throw new NodeAggregateIsTethered( - 'Node aggregate "' . $nodeAggregate->nodeAggregateIdentifier . '" is classified as tethered.', + 'Node aggregate "' . $nodeAggregate->nodeAggregateId . '" is classified as tethered.', 1554587288 ); } @@ -487,26 +487,26 @@ protected function requireNodeAggregateToBeUntethered(NodeAggregate $nodeAggrega * @throws NodeAggregateIsDescendant */ protected function requireNodeAggregateToNotBeDescendant( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeAggregate $nodeAggregate, NodeAggregate $referenceNodeAggregate, ContentRepository $contentRepository ): void { - if ($nodeAggregate->nodeAggregateIdentifier->equals($referenceNodeAggregate->nodeAggregateIdentifier)) { + if ($nodeAggregate->nodeAggregateId->equals($referenceNodeAggregate->nodeAggregateId)) { throw new NodeAggregateIsDescendant( - 'Node aggregate "' . $nodeAggregate->nodeAggregateIdentifier - . '" is descendant of node aggregate "' . $referenceNodeAggregate->nodeAggregateIdentifier . '"', + 'Node aggregate "' . $nodeAggregate->nodeAggregateId + . '" is descendant of node aggregate "' . $referenceNodeAggregate->nodeAggregateId . '"', 1554971124 ); } foreach ( $contentRepository->getContentGraph()->findChildNodeAggregates( - $contentStreamIdentifier, - $referenceNodeAggregate->nodeAggregateIdentifier + $contentStreamId, + $referenceNodeAggregate->nodeAggregateId ) as $childReferenceNodeAggregate ) { $this->requireNodeAggregateToNotBeDescendant( - $contentStreamIdentifier, + $contentStreamId, $nodeAggregate, $childReferenceNodeAggregate, $contentRepository @@ -518,9 +518,9 @@ protected function requireNodeAggregateToNotBeDescendant( * @throws NodeNameIsAlreadyOccupied */ protected function requireNodeNameToBeUnoccupied( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, ?NodeName $nodeName, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $parentOriginDimensionSpacePoint, DimensionSpacePointSet $dimensionSpacePoints, ContentRepository $contentRepository @@ -530,16 +530,16 @@ protected function requireNodeNameToBeUnoccupied( } $dimensionSpacePointsOccupiedByChildNodeName = $contentRepository->getContentGraph() ->getDimensionSpacePointsOccupiedByChildNodeName( - $contentStreamIdentifier, + $contentStreamId, $nodeName, - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $parentOriginDimensionSpacePoint, $dimensionSpacePoints ); if (count($dimensionSpacePointsOccupiedByChildNodeName) > 0) { throw new NodeNameIsAlreadyOccupied( 'Child node name "' . $nodeName . '" is already occupied for parent "' - . $parentNodeAggregateIdentifier . '" in dimension space points ' + . $parentNodeAggregateId . '" in dimension space points ' . $dimensionSpacePointsOccupiedByChildNodeName ); } @@ -549,9 +549,9 @@ protected function requireNodeNameToBeUnoccupied( * @throws NodeNameIsAlreadyCovered */ protected function requireNodeNameToBeUncovered( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, ?NodeName $nodeName, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, DimensionSpacePointSet $dimensionSpacePointsToBeCovered, ContentRepository $contentRepository ): void { @@ -559,8 +559,8 @@ protected function requireNodeNameToBeUncovered( return; } $childNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregatesByName( - $contentStreamIdentifier, - $parentNodeAggregateIdentifier, + $contentStreamId, + $parentNodeAggregateId, $nodeName ); foreach ($childNodeAggregates as $childNodeAggregate) { @@ -571,7 +571,7 @@ protected function requireNodeNameToBeUncovered( throw new NodeNameIsAlreadyCovered( 'Node name "' . $nodeName . '" is already covered in dimension space points ' . $alreadyCoveredDimensionSpacePoints . ' by node aggregate "' - . $childNodeAggregate->nodeAggregateIdentifier . '".' + . $childNodeAggregate->nodeAggregateId . '".' ); } } @@ -587,7 +587,7 @@ protected function requireNodeAggregateToOccupyDimensionSpacePoint( if (!$nodeAggregate->occupiesDimensionSpacePoint($originDimensionSpacePoint)) { throw new DimensionSpacePointIsNotYetOccupied( 'Dimension space point ' . json_encode($originDimensionSpacePoint) - . ' is not yet occupied by node aggregate "' . $nodeAggregate->nodeAggregateIdentifier . '"', + . ' is not yet occupied by node aggregate "' . $nodeAggregate->nodeAggregateId . '"', 1552595396 ); } @@ -603,7 +603,7 @@ protected function requireNodeAggregateToNotOccupyDimensionSpacePoint( if ($nodeAggregate->occupiesDimensionSpacePoint($originDimensionSpacePoint)) { throw new DimensionSpacePointIsAlreadyOccupied( 'Dimension space point ' . json_encode($originDimensionSpacePoint) - . ' is already occupied by node aggregate "' . $nodeAggregate->nodeAggregateIdentifier . '"', + . ' is already occupied by node aggregate "' . $nodeAggregate->nodeAggregateId . '"', 1552595441 ); } @@ -618,7 +618,7 @@ protected function requireNodeAggregateToDisableDimensionSpacePoint( ): void { if (!$nodeAggregate->disablesDimensionSpacePoint($dimensionSpacePoint)) { throw new NodeAggregateCurrentlyDoesNotDisableDimensionSpacePoint( - 'Node aggregate "' . $nodeAggregate->nodeAggregateIdentifier + 'Node aggregate "' . $nodeAggregate->nodeAggregateId . '" currently does not disable dimension space point ' . json_encode($dimensionSpacePoint) . '.', 1557735431 @@ -635,7 +635,7 @@ protected function requireNodeAggregateToNotDisableDimensionSpacePoint( ): void { if ($nodeAggregate->disablesDimensionSpacePoint($dimensionSpacePoint)) { throw new NodeAggregateCurrentlyDisablesDimensionSpacePoint( - 'Node aggregate "' . $nodeAggregate->nodeAggregateIdentifier + 'Node aggregate "' . $nodeAggregate->nodeAggregateId . '" currently disables dimension space point ' . json_encode($dimensionSpacePoint) . '.', 1555179563 ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/EmbedsContentStreamAndNodeAggregateIdentifier.php b/Neos.ContentRepository.Core/Classes/Feature/Common/EmbedsContentStreamAndNodeAggregateId.php similarity index 70% rename from Neos.ContentRepository.Core/Classes/Feature/Common/EmbedsContentStreamAndNodeAggregateIdentifier.php rename to Neos.ContentRepository.Core/Classes/Feature/Common/EmbedsContentStreamAndNodeAggregateId.php index b85e0cfb67d..6506dbe1fe0 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/EmbedsContentStreamAndNodeAggregateIdentifier.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/EmbedsContentStreamAndNodeAggregateId.php @@ -14,18 +14,18 @@ namespace Neos\ContentRepository\Core\Feature\Common; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** - * This interface is implemented by **events** which contain ContentStreamIdentifier and NodeAggregateIdentifier. + * This interface is implemented by **events** which contain ContentStreamId and NodeAggregateId. * * This is relevant e.g. for content cache flushing as a result of an event. * * @internal */ -interface EmbedsContentStreamAndNodeAggregateIdentifier +interface EmbedsContentStreamAndNodeAggregateId { - public function getContentStreamIdentifier(): ContentStreamIdentifier; - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier; + public function getContentStreamId(): ContentStreamId; + public function getNodeAggregateId(): NodeAggregateId; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/MatchableWithNodeIdentifierToPublishOrDiscardInterface.php b/Neos.ContentRepository.Core/Classes/Feature/Common/MatchableWithNodeIdToPublishOrDiscardInterface.php similarity index 76% rename from Neos.ContentRepository.Core/Classes/Feature/Common/MatchableWithNodeIdentifierToPublishOrDiscardInterface.php rename to Neos.ContentRepository.Core/Classes/Feature/Common/MatchableWithNodeIdToPublishOrDiscardInterface.php index 2c58c116998..edde6697d10 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/MatchableWithNodeIdentifierToPublishOrDiscardInterface.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/MatchableWithNodeIdToPublishOrDiscardInterface.php @@ -14,17 +14,17 @@ namespace Neos\ContentRepository\Core\Feature\Common; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; /** * This interface must be implemented by all commands which are working with individual nodes, such that they are - * filterable whether they are applying their action to a NodeIdentifierToPublish. + * filterable whether they are applying their action to a NodeIdToPublish. * * This is needed to publish and discard individual nodes. * * @internal because only relevant for commands */ -interface MatchableWithNodeIdentifierToPublishOrDiscardInterface +interface MatchableWithNodeIdToPublishOrDiscardInterface { - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool; + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/NodeAggregateEventPublisher.php b/Neos.ContentRepository.Core/Classes/Feature/Common/NodeAggregateEventPublisher.php index f7fe8b6d31f..5b48dc4163c 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/NodeAggregateEventPublisher.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/NodeAggregateEventPublisher.php @@ -65,9 +65,9 @@ public static function enrichWithCommand( } $commandPayload = $command->jsonSerialize(); - if (!isset($commandPayload['contentStreamIdentifier'])) { + if (!isset($commandPayload['contentStreamId'])) { throw new \RuntimeException(sprintf( - 'TODO: Command %s does not have a property "contentStreamIdentifier" (which is required).', + 'TODO: Command %s does not have a property "contentStreamId" (which is required).', get_class($command) )); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/NodeVariationInternals.php b/Neos.ContentRepository.Core/Classes/Feature/Common/NodeVariationInternals.php index 3dceafedfe7..58e5bfe7b46 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/NodeVariationInternals.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/NodeVariationInternals.php @@ -19,13 +19,13 @@ use Neos\ContentRepository\Core\EventStore\EventInterface; use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodeGeneralizationVariantWasCreated; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodePeerVariantWasCreated; use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodeSpecializationVariantWasCreated; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * @internal implementation details of command handlers @@ -35,11 +35,11 @@ trait NodeVariationInternals abstract protected function getInterDimensionalVariationGraph(): DimensionSpace\InterDimensionalVariationGraph; protected function createEventsForVariations( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events { return match ( @@ -49,48 +49,48 @@ protected function createEventsForVariations( ) ) { DimensionSpace\VariantType::TYPE_SPECIALIZATION => $this->handleCreateNodeSpecializationVariant( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $nodeAggregate, - $initiatingUserIdentifier, + $initiatingUserId, $contentRepository ), DimensionSpace\VariantType::TYPE_GENERALIZATION => $this->handleCreateNodeGeneralizationVariant( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $nodeAggregate, - $initiatingUserIdentifier, + $initiatingUserId, $contentRepository ), default => $this->handleCreateNodePeerVariant( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $nodeAggregate, - $initiatingUserIdentifier, + $initiatingUserId, $contentRepository ), }; } protected function handleCreateNodeSpecializationVariant( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events { $specializationVisibility = $this->calculateEffectiveVisibility($targetOrigin, $nodeAggregate); $events = $this->collectNodeSpecializationVariantsThatWillHaveBeenCreated( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $nodeAggregate, $specializationVisibility, - $initiatingUserIdentifier, + $initiatingUserId, [], $contentRepository ); @@ -103,37 +103,37 @@ protected function handleCreateNodeSpecializationVariant( * @return array */ protected function collectNodeSpecializationVariantsThatWillHaveBeenCreated( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $specializationVisibility, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, array $events, ContentRepository $contentRepository ): array { $events[] = new NodeSpecializationVariantWasCreated( - $contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier, + $contentStreamId, + $nodeAggregate->nodeAggregateId, $sourceOrigin, $targetOrigin, $specializationVisibility, - $initiatingUserIdentifier + $initiatingUserId ); foreach ( $contentRepository->getContentGraph()->findTetheredChildNodeAggregates( - $contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $contentStreamId, + $nodeAggregate->nodeAggregateId ) as $tetheredChildNodeAggregate ) { $events = $this->collectNodeSpecializationVariantsThatWillHaveBeenCreated( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $tetheredChildNodeAggregate, $specializationVisibility, - $initiatingUserIdentifier, + $initiatingUserId, $events, $contentRepository ); @@ -143,21 +143,21 @@ protected function collectNodeSpecializationVariantsThatWillHaveBeenCreated( } protected function handleCreateNodeGeneralizationVariant( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events { $generalizationVisibility = $this->calculateEffectiveVisibility($targetOrigin, $nodeAggregate); $events = $this->collectNodeGeneralizationVariantsThatWillHaveBeenCreated( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $nodeAggregate, $generalizationVisibility, - $initiatingUserIdentifier, + $initiatingUserId, [], $contentRepository ); @@ -170,37 +170,37 @@ protected function handleCreateNodeGeneralizationVariant( * @return array */ protected function collectNodeGeneralizationVariantsThatWillHaveBeenCreated( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $generalizationVisibility, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, array $events, ContentRepository $contentRepository ): array { $events[] = new NodeGeneralizationVariantWasCreated( - $contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier, + $contentStreamId, + $nodeAggregate->nodeAggregateId, $sourceOrigin, $targetOrigin, $generalizationVisibility, - $initiatingUserIdentifier + $initiatingUserId ); foreach ( $contentRepository->getContentGraph()->findTetheredChildNodeAggregates( - $contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $contentStreamId, + $nodeAggregate->nodeAggregateId ) as $tetheredChildNodeAggregate ) { $events = $this->collectNodeGeneralizationVariantsThatWillHaveBeenCreated( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $tetheredChildNodeAggregate, $generalizationVisibility, - $initiatingUserIdentifier, + $initiatingUserId, $events, $contentRepository ); @@ -210,21 +210,21 @@ protected function collectNodeGeneralizationVariantsThatWillHaveBeenCreated( } protected function handleCreateNodePeerVariant( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events { $peerVisibility = $this->calculateEffectiveVisibility($targetOrigin, $nodeAggregate); $events = $this->collectNodePeerVariantsThatWillHaveBeenCreated( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $nodeAggregate, $peerVisibility, - $initiatingUserIdentifier, + $initiatingUserId, [], $contentRepository ); @@ -237,37 +237,37 @@ protected function handleCreateNodePeerVariant( * @return array */ protected function collectNodePeerVariantsThatWillHaveBeenCreated( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $peerVisibility, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, array $events, ContentRepository $contentRepository ): array { $events[] = new NodePeerVariantWasCreated( - $contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier, + $contentStreamId, + $nodeAggregate->nodeAggregateId, $sourceOrigin, $targetOrigin, $peerVisibility, - $initiatingUserIdentifier + $initiatingUserId ); foreach ( $contentRepository->getContentGraph()->findTetheredChildNodeAggregates( - $contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $contentStreamId, + $nodeAggregate->nodeAggregateId ) as $tetheredChildNodeAggregate ) { $events = $this->collectNodePeerVariantsThatWillHaveBeenCreated( - $contentStreamIdentifier, + $contentStreamId, $sourceOrigin, $targetOrigin, $tetheredChildNodeAggregate, $peerVisibility, - $initiatingUserIdentifier, + $initiatingUserId, $events, $contentRepository ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/PublishableToOtherContentStreamsInterface.php b/Neos.ContentRepository.Core/Classes/Feature/Common/PublishableToOtherContentStreamsInterface.php index acbba0d244b..5b90e1f10c5 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/PublishableToOtherContentStreamsInterface.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/PublishableToOtherContentStreamsInterface.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\Feature\Common; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * This interface is implemented by **events** which can be published to different content streams. @@ -27,5 +27,5 @@ */ interface PublishableToOtherContentStreamsInterface { - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self; + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherContentStreamsInterface.php b/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherContentStreamsInterface.php index b290e046eaa..0636ae5fc72 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherContentStreamsInterface.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/RebasableToOtherContentStreamsInterface.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Feature\Common; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * This interface is implemented by **commands** which can be rebased to other Content Streams. This is basically all @@ -27,7 +27,7 @@ */ interface RebasableToOtherContentStreamsInterface { - public function createCopyForContentStream(ContentStreamIdentifier $target): CommandInterface; + public function createCopyForContentStream(ContentStreamId $target): CommandInterface; /** * called during deserialization from metadata diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php b/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php index 08b47ceb73e..a9262427038 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php @@ -21,13 +21,13 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\NodeType\NodeType; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * @internal implementation details of command handlers @@ -37,11 +37,11 @@ trait TetheredNodeInternals use NodeVariationInternals; abstract protected function createEventsForVariations( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events; @@ -57,14 +57,14 @@ protected function createEventsForMissingTetheredNode( NodeAggregate $parentNodeAggregate, Node $parentNode, NodeName $tetheredNodeName, - ?NodeAggregateIdentifier $tetheredNodeAggregateIdentifier, + ?NodeAggregateId $tetheredNodeAggregateId, NodeType $expectedTetheredNodeType, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events { $childNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregatesByName( - $parentNode->subgraphIdentity->contentStreamIdentifier, - $parentNode->nodeAggregateIdentifier, + $parentNode->subgraphIdentity->contentStreamId, + $parentNode->nodeAggregateId, $tetheredNodeName ); @@ -79,16 +79,16 @@ protected function createEventsForMissingTetheredNode( // there is no tethered child node aggregate already; let's create it! return Events::with( new NodeAggregateWithNodeWasCreated( - $parentNode->subgraphIdentity->contentStreamIdentifier, - $tetheredNodeAggregateIdentifier ?: NodeAggregateIdentifier::create(), + $parentNode->subgraphIdentity->contentStreamId, + $tetheredNodeAggregateId ?: NodeAggregateId::create(), $expectedTetheredNodeType->name, $parentNode->originDimensionSpacePoint, $parentNodeAggregate->getCoverageByOccupant($parentNode->originDimensionSpacePoint), - $parentNode->nodeAggregateIdentifier, + $parentNode->nodeAggregateId, $tetheredNodeName, SerializedPropertyValues::defaultFromNodeType($expectedTetheredNodeType), NodeAggregateClassification::CLASSIFICATION_TETHERED, - $initiatingUserIdentifier + $initiatingUserId ) ); } elseif (count($childNodeAggregates) === 1) { @@ -109,11 +109,11 @@ protected function createEventsForMissingTetheredNode( } /** @var Node $childNodeSource Node aggregates are never empty */ return $this->createEventsForVariations( - $parentNode->subgraphIdentity->contentStreamIdentifier, + $parentNode->subgraphIdentity->contentStreamId, $childNodeSource->originDimensionSpacePoint, $parentNode->originDimensionSpacePoint, $parentNodeAggregate, - $initiatingUserIdentifier, + $initiatingUserId, $contentRepository ); } else { diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCommandHandler.php index 86b8b3aa951..157d679f9f2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCommandHandler.php @@ -26,7 +26,7 @@ use Neos\ContentRepository\Core\Feature\ContentStreamRemoval\Command\RemoveContentStream; use Neos\ContentRepository\Core\Feature\ContentStreamRemoval\Event\ContentStreamWasRemoved; use Neos\EventStore\Model\EventStream\ExpectedVersion; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamAlreadyExists; use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamDoesNotExistYet; @@ -64,16 +64,16 @@ private function handleCreateContentStream( CreateContentStream $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToNotExistYet($command->contentStreamIdentifier, $contentRepository); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + $this->requireContentStreamToNotExistYet($command->contentStreamId, $contentRepository); + $streamName = ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(); return new EventsToPublish( $streamName, Events::with( new ContentStreamWasCreated( - $command->contentStreamIdentifier, - $command->initiatingUserIdentifier + $command->contentStreamId, + $command->initiatingUserId ) ), ExpectedVersion::NO_STREAM() @@ -88,23 +88,23 @@ private function handleForkContentStream( ForkContentStream $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->sourceContentStreamIdentifier, $contentRepository); - $this->requireContentStreamToNotExistYet($command->newContentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->sourceContentStreamId, $contentRepository); + $this->requireContentStreamToNotExistYet($command->newContentStreamId, $contentRepository); $sourceContentStreamVersion = $contentRepository->getContentStreamFinder() - ->findVersionForContentStream($command->sourceContentStreamIdentifier); + ->findVersionForContentStream($command->sourceContentStreamId); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($command->newContentStreamIdentifier) + $streamName = ContentStreamEventStreamName::fromContentStreamId($command->newContentStreamId) ->getEventStreamName(); return new EventsToPublish( $streamName, Events::with( new ContentStreamWasForked( - $command->newContentStreamIdentifier, - $command->sourceContentStreamIdentifier, + $command->newContentStreamId, + $command->sourceContentStreamId, $sourceContentStreamVersion->unwrap(), - $command->initiatingUserIdentifier + $command->initiatingUserId ), ), ExpectedVersion::ANY() @@ -115,18 +115,18 @@ private function handleRemoveContentStream( RemoveContentStream $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $command->contentStreamIdentifier + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $command->contentStreamId )->getEventStreamName(); return new EventsToPublish( $streamName, Events::with( new ContentStreamWasRemoved( - $command->contentStreamIdentifier, - $command->initiatingUserIdentifier + $command->contentStreamId, + $command->initiatingUserId ), ), ExpectedVersion::ANY() @@ -134,32 +134,32 @@ private function handleRemoveContentStream( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @throws ContentStreamAlreadyExists */ protected function requireContentStreamToNotExistYet( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, ContentRepository $contentRepository ): void { - if ($contentRepository->getContentStreamFinder()->hasContentStream($contentStreamIdentifier)) { + if ($contentRepository->getContentStreamFinder()->hasContentStream($contentStreamId)) { throw new ContentStreamAlreadyExists( - 'Content stream "' . $contentStreamIdentifier . '" already exists.', + 'Content stream "' . $contentStreamId . '" already exists.', 1521386345 ); } } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @throws ContentStreamDoesNotExistYet */ protected function requireContentStreamToExist( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, ContentRepository $contentRepository ): void { - if (!$contentRepository->getContentStreamFinder()->hasContentStream($contentStreamIdentifier)) { + if (!$contentRepository->getContentStreamFinder()->hasContentStream($contentStreamId)) { throw new ContentStreamDoesNotExistYet( - 'Content stream "' . $contentStreamIdentifier . '" does not exist yet.', + 'Content stream "' . $contentStreamId . '" does not exist yet.', 1521386692 ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php index baa7e5cf8a3..e7b6ca3ab2a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php @@ -15,8 +15,8 @@ */ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * CreateContentStream for creating the FIRST content stream. @@ -27,8 +27,8 @@ final class CreateContentStream implements CommandInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $contentStreamId, + public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Event/ContentStreamWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Event/ContentStreamWasCreated.php index cdeed503cfd..ca1d2ebd670 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Event/ContentStreamWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Event/ContentStreamWasCreated.php @@ -14,8 +14,8 @@ namespace Neos\ContentRepository\Core\Feature\ContentStreamCreation\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -27,24 +27,24 @@ final class ContentStreamWasCreated implements EventInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $contentStreamId, + public readonly UserId $initiatingUserId ) { } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + UserId::fromString($values['initiatingUserId']), ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamEventStreamName.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamEventStreamName.php index 3cd051a76e5..5e5063e8cf4 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamEventStreamName.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamEventStreamName.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\Feature; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\EventStore\Model\Event\StreamName; /** @@ -36,9 +36,9 @@ protected function __construct(string $eventStreamName) $this->eventStreamName = $eventStreamName; } - public static function fromContentStreamIdentifier(ContentStreamIdentifier $contentStreamIdentifier): self + public static function fromContentStreamId(ContentStreamId $contentStreamId): self { - return new ContentStreamEventStreamName(self::EVENT_STREAM_NAME_PREFIX . $contentStreamIdentifier); + return new ContentStreamEventStreamName(self::EVENT_STREAM_NAME_PREFIX . $contentStreamId); } public function getEventStreamName(): StreamName diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php index fe3b0211feb..fe1ab386a04 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php @@ -15,8 +15,8 @@ */ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * ForkContentStream for creating a new fork of a content stream. @@ -27,25 +27,26 @@ final class ForkContentStream implements CommandInterface { public function __construct( /** - * Content stream identifier for the new content stream + * Content stream id for the new content stream * - * @var ContentStreamIdentifier + * @var ContentStreamId */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier, - public readonly ContentStreamIdentifier $sourceContentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $newContentStreamId, + public readonly ContentStreamId $sourceContentStreamId, + public readonly UserId $initiatingUserId ) { } /** * @param array $array + * @internal only used for testcases */ public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - ContentStreamIdentifier::fromString($array['sourceContentStreamIdentifier']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + ContentStreamId::fromString($array['contentStreamId']), + ContentStreamId::fromString($array['sourceContentStreamId']), + UserId::fromString($array['initiatingUserId']) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Event/ContentStreamWasForked.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Event/ContentStreamWasForked.php index 0b3c7ff061d..f46366071ec 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Event/ContentStreamWasForked.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Event/ContentStreamWasForked.php @@ -15,8 +15,8 @@ */ use Neos\ContentRepository\Core\EventStore\EventInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\Version; /** @@ -28,30 +28,30 @@ public function __construct( /** * Content stream identifier for the new content stream */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier, - public readonly ContentStreamIdentifier $sourceContentStreamIdentifier, + public readonly ContentStreamId $newContentStreamId, + public readonly ContentStreamId $sourceContentStreamId, public readonly Version $versionOfSourceContentStream, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - ContentStreamIdentifier::fromString($values['sourceContentStreamIdentifier']), + ContentStreamId::fromString($values['newContentStreamId']), + ContentStreamId::fromString($values['sourceContentStreamId']), Version::fromInteger($values['versionOfSourceContentStream']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + UserId::fromString($values['initiatingUserId']), ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->newContentStreamIdentifier, - 'sourceContentStreamIdentifier' => $this->sourceContentStreamIdentifier, + 'newContentStreamId' => $this->newContentStreamId, + 'sourceContentStreamId' => $this->sourceContentStreamId, 'versionOfSourceContentStream' => $this->versionOfSourceContentStream->value, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php index 9a5a996dc72..b07c89174eb 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php @@ -15,8 +15,8 @@ */ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Command to remove an existing content stream @@ -26,8 +26,8 @@ final class RemoveContentStream implements CommandInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $contentStreamId, + public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Event/ContentStreamWasRemoved.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Event/ContentStreamWasRemoved.php index f95cc604058..5967ada3722 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Event/ContentStreamWasRemoved.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Event/ContentStreamWasRemoved.php @@ -14,8 +14,8 @@ * source code. */ -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -24,24 +24,24 @@ final class ContentStreamWasRemoved implements EventInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $contentStreamId, + public readonly UserId $initiatingUserId ) { } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + UserId::fromString($values['initiatingUserId']), ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php index 53e8e19f327..f1ff20f5efe 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/AddDimensionShineThrough.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; /** @@ -38,7 +38,7 @@ final class AddDimensionShineThrough implements RebasableToOtherContentStreamsInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamId, public readonly DimensionSpacePoint $source, public readonly DimensionSpacePoint $target ) { @@ -50,7 +50,7 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), DimensionSpacePoint::fromArray($array['source']), DimensionSpacePoint::fromArray($array['target']) ); @@ -62,13 +62,13 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, + 'contentStreamId' => $this->contentStreamId, 'source' => $this->source, 'target' => $this->target, ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php index 9f6e7ad2bcf..9165e804e47 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Command/MoveDimensionSpacePoint.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; /** @@ -34,7 +34,7 @@ final class MoveDimensionSpacePoint implements RebasableToOtherContentStreamsInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamId, public readonly DimensionSpacePoint $source, public readonly DimensionSpacePoint $target ) { @@ -46,7 +46,7 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), DimensionSpacePoint::fromArray($array['source']), DimensionSpacePoint::fromArray($array['target']) ); @@ -58,13 +58,13 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, + 'contentStreamId' => $this->contentStreamId, 'source' => $this->source, 'target' => $this->target, ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php index 8b3b7681d21..da439d3e4be 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/DimensionSpaceCommandHandler.php @@ -29,7 +29,7 @@ use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Command\MoveDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event\DimensionShineThroughWasAdded; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event\DimensionSpacePointWasMoved; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Exception\DimensionSpacePointAlreadyExists; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; @@ -70,12 +70,12 @@ private function handleMoveDimensionSpacePoint( MoveDimensionSpacePoint $command, ContentRepository $contentRepository ): EventsToPublish { - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + $streamName = ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(); self::requireDimensionSpacePointToBeEmptyInContentStream( $command->target, - $command->contentStreamIdentifier, + $command->contentStreamId, $contentRepository->getContentGraph() ); $this->requireDimensionSpacePointToExistInConfiguration($command->target); @@ -84,7 +84,7 @@ private function handleMoveDimensionSpacePoint( $streamName, Events::with( new DimensionSpacePointWasMoved( - $command->contentStreamIdentifier, + $command->contentStreamId, $command->source, $command->target ), @@ -97,12 +97,12 @@ private function handleAddDimensionShineThrough( AddDimensionShineThrough $command, ContentRepository $contentRepository ): EventsToPublish { - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + $streamName = ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(); self::requireDimensionSpacePointToBeEmptyInContentStream( $command->target, - $command->contentStreamIdentifier, + $command->contentStreamId, $contentRepository->getContentGraph() ); $this->requireDimensionSpacePointToExistInConfiguration($command->target); @@ -113,7 +113,7 @@ private function handleAddDimensionShineThrough( $streamName, Events::with( new DimensionShineThroughWasAdded( - $command->contentStreamIdentifier, + $command->contentStreamId, $command->source, $command->target ) @@ -135,18 +135,18 @@ protected function requireDimensionSpacePointToExistInConfiguration(DimensionSpa private static function requireDimensionSpacePointToBeEmptyInContentStream( DimensionSpacePoint $dimensionSpacePoint, - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, ContentGraphInterface $contentGraph ): void { $subgraph = $contentGraph->getSubgraph( - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); if ($subgraph->countNodes() > 0) { throw new DimensionSpacePointAlreadyExists(sprintf( 'the content stream %s already contained nodes in dimension space point %s - this is not allowed.', - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint ), 1612898126); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionShineThroughWasAdded.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionShineThroughWasAdded.php index e9e7832ead5..2700a89f4f7 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionShineThroughWasAdded.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionShineThroughWasAdded.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -35,16 +35,16 @@ final class DimensionShineThroughWasAdded implements EventInterface, PublishableToOtherContentStreamsInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamId, public readonly DimensionSpacePoint $source, public readonly DimensionSpacePoint $target ) { } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, + $targetContentStreamId, $this->source, $this->target ); @@ -53,7 +53,7 @@ public function createCopyForContentStream(ContentStreamIdentifier $targetConten public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), DimensionSpacePoint::fromArray($values['source']), DimensionSpacePoint::fromArray($values['target']) ); @@ -62,7 +62,7 @@ public static function fromArray(array $values): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, + 'contentStreamId' => $this->contentStreamId, 'source' => $this->source, 'target' => $this->target, ]; diff --git a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionSpacePointWasMoved.php b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionSpacePointWasMoved.php index 1468593c85c..7b646bc8130 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionSpacePointWasMoved.php +++ b/Neos.ContentRepository.Core/Classes/Feature/DimensionSpaceAdjustment/Event/DimensionSpacePointWasMoved.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -31,16 +31,16 @@ final class DimensionSpacePointWasMoved implements EventInterface, PublishableToOtherContentStreamsInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamId, public readonly DimensionSpacePoint $source, public readonly DimensionSpacePoint $target ) { } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, + $targetContentStreamId, $this->source, $this->target ); @@ -49,7 +49,7 @@ public function createCopyForContentStream(ContentStreamIdentifier $targetConten public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), DimensionSpacePoint::fromArray($values['source']), DimensionSpacePoint::fromArray($values['target']) ); @@ -58,7 +58,7 @@ public static function fromArray(array $values): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, + 'contentStreamId' => $this->contentStreamId, 'source' => $this->source, 'target' => $this->target, ]; diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeAggregateCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/NodeAggregateCommandHandler.php index b580160c8a5..ab18a151100 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeAggregateCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeAggregateCommandHandler.php @@ -195,15 +195,15 @@ public function withoutAncestorNodeTypeConstraintChecks(\Closure $callback): voi protected function checkConstraintsImposedByAncestors(ChangeNodeAggregateType $command, ContentRepository $contentRepository): void { $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $newNodeType = $this->requireNodeType($command->newNodeTypeName); foreach ( $contentRepository->getContentGraph()->findParentNodeAggregates( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier + $command->contentStreamId, + $command->nodeAggregateId ) as $parentAggregate ) { /* @var $parentAggregate NodeAggregate */ @@ -227,8 +227,8 @@ protected function checkConstraintsImposedByAncestors(ChangeNodeAggregateType $c } foreach ( $contentRepository->getContentGraph()->findParentNodeAggregates( - $command->contentStreamIdentifier, - $parentAggregate->nodeAggregateIdentifier + $command->contentStreamId, + $parentAggregate->nodeAggregateId ) as $grandParentAggregate ) { /* @var $grandParentAggregate NodeAggregate */ diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php index 3f986a8d7b1..20270665ee7 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php @@ -15,21 +15,21 @@ namespace Neos\ContentRepository\Core\Feature\NodeCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdentifiersByNodePaths; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * CreateNodeAggregateWithNode * - * Creates a new node aggregate with a new node in the given `contentStreamIdentifier` - * with the given `nodeAggregateIdentifier` and `originDimensionSpacePoint`. - * The node will be appended as child node of the given `parentNodeIdentifier` which must cover the given + * Creates a new node aggregate with a new node in the given `contentStreamId` + * with the given `nodeAggregateId` and `originDimensionSpacePoint`. + * The node will be appended as child node of the given `parentNodeId` which must cover the given * `originDimensionSpacePoint`. * * @api commands are the write-API of the ContentRepository @@ -37,10 +37,10 @@ final class CreateNodeAggregateWithNode implements CommandInterface { /** - * Node aggregate identifier of the node's succeeding sibling (optional) + * Node aggregate id of the node's succeeding sibling (optional) * If not given, the node will be added as the parent's first child */ - public readonly ?NodeAggregateIdentifier $succeedingSiblingNodeAggregateIdentifier; + public readonly ?NodeAggregateId $succeedingSiblingNodeAggregateId; /** * The node's optional name. Set if there is a meaningful relation to its parent that should be named. @@ -53,19 +53,19 @@ final class CreateNodeAggregateWithNode implements CommandInterface public readonly PropertyValuesToWrite $initialPropertyValues; /** - * NodeAggregateIdentifiers for tethered descendants (optional). + * NodeAggregateIds for tethered descendants (optional). * - * If the given node type declares tethered child nodes, you may predefine their node aggregate identifiers + * If the given node type declares tethered child nodes, you may predefine their node aggregate ids * using this assignment registry. * Since tethered child nodes may have tethered child nodes themselves, * this registry is indexed using relative node paths to the node to create in the first place. */ - public readonly NodeAggregateIdentifiersByNodePaths $tetheredDescendantNodeAggregateIdentifiers; + public readonly NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds; // TODO: CREATE METHODS FÜR ALLE COMMANDS public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamIdd, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $nodeTypeName, /** * Origin of the new node in the dimension space. @@ -73,33 +73,33 @@ public function __construct( * from the configured specializations. */ public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, - public readonly UserIdentifier $initiatingUserIdentifier, - public readonly NodeAggregateIdentifier $parentNodeAggregateIdentifier, - ?NodeAggregateIdentifier $succeedingSiblingNodeAggregateIdentifier = null, + public readonly UserId $initiatingUserId, + public readonly NodeAggregateId $parentNodeAggregateId, + ?NodeAggregateId $succeedingSiblingNodeAggregateId = null, ?NodeName $nodeName = null, ?PropertyValuesToWrite $initialPropertyValues = null, - ?NodeAggregateIdentifiersByNodePaths $tetheredDescendantNodeAggregateIdentifiers = null + ?NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds = null ) { - $this->succeedingSiblingNodeAggregateIdentifier = $succeedingSiblingNodeAggregateIdentifier; + $this->succeedingSiblingNodeAggregateId = $succeedingSiblingNodeAggregateId; $this->nodeName = $nodeName; $this->initialPropertyValues = $initialPropertyValues ?: PropertyValuesToWrite::fromArray([]); - $this->tetheredDescendantNodeAggregateIdentifiers = $tetheredDescendantNodeAggregateIdentifiers - ?: new NodeAggregateIdentifiersByNodePaths([]); + $this->tetheredDescendantNodeAggregateIds = $tetheredDescendantNodeAggregateIds + ?: new NodeAggregateIdsByNodePaths([]); } public function withInitialPropertyValues(PropertyValuesToWrite $newInitialPropertyValues): self { return new self( - $this->contentStreamIdentifier, - $this->nodeAggregateIdentifier, + $this->contentStreamIdd, + $this->nodeAggregateId, $this->nodeTypeName, $this->originDimensionSpacePoint, - $this->initiatingUserIdentifier, - $this->parentNodeAggregateIdentifier, - $this->succeedingSiblingNodeAggregateIdentifier, + $this->initiatingUserId, + $this->parentNodeAggregateId, + $this->succeedingSiblingNodeAggregateId, $this->nodeName, $newInitialPropertyValues, - $this->tetheredDescendantNodeAggregateIdentifiers + $this->tetheredDescendantNodeAggregateIds ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php index d08991f8b62..0155606a937 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php @@ -15,17 +15,17 @@ namespace Neos\ContentRepository\Core\Feature\NodeCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdentifiersByNodePaths; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * The properties of {@see CreateNodeAggregateWithNode} are directly serialized; and then this command @@ -37,7 +37,7 @@ final class CreateNodeAggregateWithNodeAndSerializedProperties implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { /** * The node's optional name. Set if there is a meaningful relation to its parent that should be named. @@ -48,7 +48,7 @@ final class CreateNodeAggregateWithNodeAndSerializedProperties implements * Node aggregate identifier of the node's succeeding sibling (optional) * If not given, the node will be added as the parent's first child */ - public readonly ?NodeAggregateIdentifier $succeedingSiblingNodeAggregateIdentifier; + public readonly ?NodeAggregateId $succeedingSiblingNodeAggregateId; /** * The node's initial property values. Will be merged over the node type's default property values @@ -56,18 +56,18 @@ final class CreateNodeAggregateWithNodeAndSerializedProperties implements public readonly SerializedPropertyValues $initialPropertyValues; /** - * NodeAggregateIdentifiers for tethered descendants (optional). + * NodeAggregateIds for tethered descendants (optional). * - * If the given node type declares tethered child nodes, you may predefine their node aggregate identifiers + * If the given node type declares tethered child nodes, you may predefine their node aggregate ids * using this assignment registry. * Since tethered child nodes may have tethered child nodes themselves, * this registry is indexed using relative node paths to the node to create in the first place. */ - public readonly NodeAggregateIdentifiersByNodePaths $tetheredDescendantNodeAggregateIdentifiers; + public readonly NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds; public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $nodeTypeName, /** * Origin of the new node in the dimension space. @@ -75,18 +75,18 @@ public function __construct( * from the configured specializations. */ public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, - public readonly UserIdentifier $initiatingUserIdentifier, - public readonly NodeAggregateIdentifier $parentNodeAggregateIdentifier, - ?NodeAggregateIdentifier $succeedingSiblingNodeAggregateIdentifier = null, + public readonly UserId $initiatingUserId, + public readonly NodeAggregateId $parentNodeAggregateId, + ?NodeAggregateId $succeedingSiblingNodeAggregateId = null, ?NodeName $nodeName = null, ?SerializedPropertyValues $initialPropertyValues = null, - ?NodeAggregateIdentifiersByNodePaths $tetheredDescendantNodeAggregateIdentifiers = null + ?NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds = null ) { - $this->succeedingSiblingNodeAggregateIdentifier = $succeedingSiblingNodeAggregateIdentifier; + $this->succeedingSiblingNodeAggregateId = $succeedingSiblingNodeAggregateId; $this->nodeName = $nodeName; $this->initialPropertyValues = $initialPropertyValues ?: SerializedPropertyValues::fromArray([]); - $this->tetheredDescendantNodeAggregateIdentifiers = $tetheredDescendantNodeAggregateIdentifiers - ?: new NodeAggregateIdentifiersByNodePaths([]); + $this->tetheredDescendantNodeAggregateIds = $tetheredDescendantNodeAggregateIds + ?: new NodeAggregateIdsByNodePaths([]); } /** @@ -95,14 +95,14 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['nodeTypeName']), OriginDimensionSpacePoint::fromArray($array['originDimensionSpacePoint']), - UserIdentifier::fromString($array['initiatingUserIdentifier']), - NodeAggregateIdentifier::fromString($array['parentNodeAggregateIdentifier']), - isset($array['succeedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($array['succeedingSiblingNodeAggregateIdentifier']) + UserId::fromString($array['initiatingUserId']), + NodeAggregateId::fromString($array['parentNodeAggregateId']), + isset($array['succeedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($array['succeedingSiblingNodeAggregateId']) : null, isset($array['nodeName']) ? NodeName::fromString($array['nodeName']) @@ -110,38 +110,33 @@ public static function fromArray(array $array): self isset($array['initialPropertyValues']) ? SerializedPropertyValues::fromArray($array['initialPropertyValues']) : null, - isset($array['tetheredDescendantNodeAggregateIdentifiers']) - ? NodeAggregateIdentifiersByNodePaths::fromArray($array['tetheredDescendantNodeAggregateIdentifiers']) + isset($array['tetheredDescendantNodeAggregateIds']) + ? NodeAggregateIdsByNodePaths::fromArray($array['tetheredDescendantNodeAggregateIds']) : null ); } - public function getInitialPropertyValues(): SerializedPropertyValues - { - return $this->initialPropertyValues; - } - /** * Create a new CreateNodeAggregateWithNode command with all original values, - * except the tetheredDescendantNodeAggregateIdentifiers (where the passed in arguments are used). + * except the tetheredDescendantNodeAggregateIds (where the passed in arguments are used). * * Is needed to make this command fully deterministic before storing it at the events * - we need this */ - public function withTetheredDescendantNodeAggregateIdentifiers( - NodeAggregateIdentifiersByNodePaths $tetheredDescendantNodeAggregateIdentifiers + public function withTetheredDescendantNodeAggregateIds( + NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds ): self { return new self( - $this->contentStreamIdentifier, - $this->nodeAggregateIdentifier, + $this->contentStreamId, + $this->nodeAggregateId, $this->nodeTypeName, $this->originDimensionSpacePoint, - $this->initiatingUserIdentifier, - $this->parentNodeAggregateIdentifier, - $this->succeedingSiblingNodeAggregateIdentifier, + $this->initiatingUserId, + $this->parentNodeAggregateId, + $this->succeedingSiblingNodeAggregateId, $this->nodeName, $this->initialPropertyValues, - $tetheredDescendantNodeAggregateIdentifiers + $tetheredDescendantNodeAggregateIds ); } @@ -151,41 +146,41 @@ public function withTetheredDescendantNodeAggregateIdentifiers( public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'nodeTypeName' => $this->nodeTypeName, 'originDimensionSpacePoint' => $this->originDimensionSpacePoint, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, - 'parentNodeAggregateIdentifier' => $this->parentNodeAggregateIdentifier, - 'succeedingSiblingNodeAggregateIdentifier' => $this->succeedingSiblingNodeAggregateIdentifier, + 'initiatingUserId' => $this->initiatingUserId, + 'parentNodeAggregateId' => $this->parentNodeAggregateId, + 'succeedingSiblingNodeAggregateId' => $this->succeedingSiblingNodeAggregateId, 'nodeName' => $this->nodeName, 'initialPropertyValues' => $this->initialPropertyValues, - 'tetheredDescendantNodeAggregateIdentifiers' => $this->tetheredDescendantNodeAggregateIdentifiers + 'tetheredDescendantNodeAggregateIds' => $this->tetheredDescendantNodeAggregateIds ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->nodeTypeName, $this->originDimensionSpacePoint, - $this->initiatingUserIdentifier, - $this->parentNodeAggregateIdentifier, - $this->succeedingSiblingNodeAggregateIdentifier, + $this->initiatingUserId, + $this->parentNodeAggregateId, + $this->succeedingSiblingNodeAggregateId, $this->nodeName, $this->initialPropertyValues, - $this->tetheredDescendantNodeAggregateIdentifiers + $this->tetheredDescendantNodeAggregateIds ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) - && $this->originDimensionSpacePoint->equals($nodeIdentifierToPublish->dimensionSpacePoint) + $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) + && $this->originDimensionSpacePoint->equals($nodeIdToPublish->dimensionSpacePoint) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Dto/NodeAggregateIdentifiersByNodePaths.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Dto/NodeAggregateIdentifiersByNodePaths.php deleted file mode 100644 index 15fea1cf0a0..00000000000 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Dto/NodeAggregateIdentifiersByNodePaths.php +++ /dev/null @@ -1,129 +0,0 @@ - my-main-node} - * - * @var array - */ - protected array $nodeAggregateIdentifiers = []; - - /** - * @param array $nodeAggregateIdentifiers - */ - public function __construct(array $nodeAggregateIdentifiers) - { - foreach ($nodeAggregateIdentifiers as $nodePath => $nodeAggregateIdentifier) { - $nodePath = NodePath::fromString($nodePath); - if (!$nodeAggregateIdentifier instanceof NodeAggregateIdentifier) { - throw new \InvalidArgumentException( - 'NodeAggregateIdentifiersByNodePaths objects can only be composed of NodeAggregateIdentifiers.', - 1541751553 - ); - } - - $this->nodeAggregateIdentifiers[(string)$nodePath] = $nodeAggregateIdentifier; - } - } - - public static function createEmpty(): self - { - return new self([]); - } - - /** - * @param array $array - */ - public static function fromArray(array $array): self - { - $nodeAggregateIdentifiers = []; - foreach ($array as $rawNodePath => $rawNodeAggregateIdentifier) { - if (!is_string($rawNodePath)) { - throw new \InvalidArgumentException( - 'NodeAggregateIdentifiersByNodePaths must be indexed by node path.', - 1645632667 - ); - } - if (is_string($rawNodeAggregateIdentifier)) { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($rawNodeAggregateIdentifier); - } elseif ($rawNodeAggregateIdentifier instanceof NodeAggregateIdentifier) { - $nodeAggregateIdentifier = $rawNodeAggregateIdentifier; - } else { - throw new \InvalidArgumentException( - 'NodeAggregateIdentifiersByNodePaths must only contain NodeAggregateIdentifiers.', - 1645632633 - ); - } - $nodeAggregateIdentifiers[$rawNodePath] = $nodeAggregateIdentifier; - } - - return new self($nodeAggregateIdentifiers); - } - - /** - * @throws \JsonException - */ - public static function fromJsonString(string $jsonString): self - { - return self::fromArray(\json_decode($jsonString, true, 512, JSON_THROW_ON_ERROR)); - } - - public function merge(self $other): self - { - return new self(array_merge($this->nodeAggregateIdentifiers, $other->getNodeAggregateIdentifiers())); - } - - public function getNodeAggregateIdentifier(NodePath $nodePath): ?NodeAggregateIdentifier - { - return $this->nodeAggregateIdentifiers[(string)$nodePath] ?? null; - } - - public function add(NodePath $nodePath, NodeAggregateIdentifier $nodeAggregateIdentifier): self - { - $nodeAggregateIdentifiers = $this->nodeAggregateIdentifiers; - $nodeAggregateIdentifiers[(string)$nodePath] = $nodeAggregateIdentifier; - - return new self($nodeAggregateIdentifiers); - } - - /** - * @return array - */ - public function getNodeAggregateIdentifiers(): array - { - return $this->nodeAggregateIdentifiers; - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - return $this->nodeAggregateIdentifiers; - } -} diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Dto/NodeAggregateIdsByNodePaths.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Dto/NodeAggregateIdsByNodePaths.php new file mode 100644 index 00000000000..8d22b442aad --- /dev/null +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Dto/NodeAggregateIdsByNodePaths.php @@ -0,0 +1,129 @@ + my-main-node} + * + * @var array + */ + protected array $nodeAggregateIds = []; + + /** + * @param array $nodeAggregateIds + */ + public function __construct(array $nodeAggregateIds) + { + foreach ($nodeAggregateIds as $nodePath => $nodeAggregateId) { + $nodePath = NodePath::fromString($nodePath); + if (!$nodeAggregateId instanceof NodeAggregateId) { + throw new \InvalidArgumentException( + 'NodeAggregateIdsByNodePaths objects can only be composed of NodeAggregateIds.', + 1541751553 + ); + } + + $this->nodeAggregateIds[(string)$nodePath] = $nodeAggregateId; + } + } + + public static function createEmpty(): self + { + return new self([]); + } + + /** + * @param array $array + */ + public static function fromArray(array $array): self + { + $nodeAggregateIds = []; + foreach ($array as $rawNodePath => $rawNodeAggregateId) { + if (!is_string($rawNodePath)) { + throw new \InvalidArgumentException( + 'NodeAggregateIdsByNodePaths must be indexed by node path.', + 1645632667 + ); + } + if (is_string($rawNodeAggregateId)) { + $nodeAggregateId = NodeAggregateId::fromString($rawNodeAggregateId); + } elseif ($rawNodeAggregateId instanceof NodeAggregateId) { + $nodeAggregateId = $rawNodeAggregateId; + } else { + throw new \InvalidArgumentException( + 'NodeAggregateIdsByNodePaths must only contain NodeAggregateIds.', + 1645632633 + ); + } + $nodeAggregateIds[$rawNodePath] = $nodeAggregateId; + } + + return new self($nodeAggregateIds); + } + + /** + * @throws \JsonException + */ + public static function fromJsonString(string $jsonString): self + { + return self::fromArray(\json_decode($jsonString, true, 512, JSON_THROW_ON_ERROR)); + } + + public function merge(self $other): self + { + return new self(array_merge($this->nodeAggregateIds, $other->getNodeAggregateIds())); + } + + public function getNodeAggregateId(NodePath $nodePath): ?NodeAggregateId + { + return $this->nodeAggregateIds[(string)$nodePath] ?? null; + } + + public function add(NodePath $nodePath, NodeAggregateId $nodeAggregateId): self + { + $nodeAggregateIds = $this->nodeAggregateIds; + $nodeAggregateIds[(string)$nodePath] = $nodeAggregateId; + + return new self($nodeAggregateIds); + } + + /** + * @return array + */ + public function getNodeAggregateIds(): array + { + return $this->nodeAggregateIds; + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + return $this->nodeAggregateIds; + } +} diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Event/NodeAggregateWithNodeWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Event/NodeAggregateWithNodeWasCreated.php index 470c8b4672b..807f39517d1 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Event/NodeAggregateWithNodeWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Event/NodeAggregateWithNodeWasCreated.php @@ -14,16 +14,16 @@ namespace Neos\ContentRepository\Core\Feature\NodeCreation\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -35,31 +35,31 @@ final class NodeAggregateWithNodeWasCreated implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $nodeTypeName, public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, public readonly DimensionSpacePointSet $coveredDimensionSpacePoints, - public readonly NodeAggregateIdentifier $parentNodeAggregateIdentifier, + public readonly NodeAggregateId $parentNodeAggregateId, public readonly ?NodeName $nodeName, public readonly SerializedPropertyValues $initialPropertyValues, public readonly NodeAggregateClassification $nodeAggregateClassification, - public readonly UserIdentifier $initiatingUserIdentifier, - public readonly ?NodeAggregateIdentifier $succeedingNodeAggregateIdentifier = null + public readonly UserId $initiatingUserId, + public readonly ?NodeAggregateId $succeedingNodeAggregateId = null ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } public function getOriginDimensionSpacePoint(): OriginDimensionSpacePoint @@ -67,38 +67,38 @@ public function getOriginDimensionSpacePoint(): OriginDimensionSpacePoint return $this->originDimensionSpacePoint; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->nodeTypeName, $this->originDimensionSpacePoint, $this->coveredDimensionSpacePoints, - $this->parentNodeAggregateIdentifier, + $this->parentNodeAggregateId, $this->nodeName, $this->initialPropertyValues, $this->nodeAggregateClassification, - $this->initiatingUserIdentifier, - $this->succeedingNodeAggregateIdentifier + $this->initiatingUserId, + $this->succeedingNodeAggregateId ); } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), NodeTypeName::fromString($values['nodeTypeName']), OriginDimensionSpacePoint::fromArray($values['originDimensionSpacePoint']), DimensionSpacePointSet::fromArray($values['coveredDimensionSpacePoints']), - NodeAggregateIdentifier::fromString($values['parentNodeAggregateIdentifier']), + NodeAggregateId::fromString($values['parentNodeAggregateId']), isset($values['nodeName']) ? NodeName::fromString($values['nodeName']) : null, SerializedPropertyValues::fromArray($values['initialPropertyValues']), NodeAggregateClassification::from($values['nodeAggregateClassification']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), - isset($values['succeedingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($values['succeedingNodeAggregateIdentifier']) + UserId::fromString($values['initiatingUserId']), + isset($values['succeedingNodeAggregateId']) + ? NodeAggregateId::fromString($values['succeedingNodeAggregateId']) : null, ); } @@ -106,17 +106,17 @@ public static function fromArray(array $values): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'nodeTypeName' => $this->nodeTypeName, 'originDimensionSpacePoint' => $this->originDimensionSpacePoint, 'coveredDimensionSpacePoints' => $this->coveredDimensionSpacePoints, - 'parentNodeAggregateIdentifier' => $this->parentNodeAggregateIdentifier, + 'parentNodeAggregateId' => $this->parentNodeAggregateId, 'nodeName' => $this->nodeName, 'initialPropertyValues' => $this->initialPropertyValues, 'nodeAggregateClassification' => $this->nodeAggregateClassification, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, - 'succeedingNodeAggregateIdentifier' => $this->succeedingNodeAggregateIdentifier + 'initiatingUserId' => $this->initiatingUserId, + 'succeedingNodeAggregateId' => $this->succeedingNodeAggregateId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php index 0f0545ef9c3..202725456a8 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php @@ -20,7 +20,7 @@ use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\NodeType\NodeType; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -37,7 +37,7 @@ use Neos\ContentRepository\Core\SharedModel\Exception\PropertyCannotBeSet; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\Feature\Common\NodeAggregateEventPublisher; -use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdentifiersByNodePaths; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; @@ -76,19 +76,19 @@ private function handleCreateNodeAggregateWithNode( $this->validateProperties($command->initialPropertyValues, $command->nodeTypeName); $lowLevelCommand = new CreateNodeAggregateWithNodeAndSerializedProperties( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamIdd, + $command->nodeAggregateId, $command->nodeTypeName, $command->originDimensionSpacePoint, - $command->initiatingUserIdentifier, - $command->parentNodeAggregateIdentifier, - $command->succeedingSiblingNodeAggregateIdentifier, + $command->initiatingUserId, + $command->parentNodeAggregateId, + $command->succeedingSiblingNodeAggregateId, $command->nodeName, $this->getPropertyConverter()->serializePropertyValues( $command->initialPropertyValues, $this->requireNodeType($command->nodeTypeName) ), - $command->tetheredDescendantNodeAggregateIdentifiers + $command->tetheredDescendantNodeAggregateIds ); return $this->handleCreateNodeAggregateWithNodeAndSerializedProperties($lowLevelCommand, $contentRepository); @@ -158,7 +158,7 @@ private function handleCreateNodeAggregateWithNodeAndSerializedProperties( CreateNodeAggregateWithNodeAndSerializedProperties $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist($command->originDimensionSpacePoint->toDimensionSpacePoint()); $nodeType = $this->requireNodeType($command->nodeTypeName); $this->requireNodeTypeToNotBeAbstract($nodeType); @@ -167,27 +167,27 @@ private function handleCreateNodeAggregateWithNodeAndSerializedProperties( $this->requireTetheredDescendantNodeTypesToNotBeOfTypeRoot($nodeType); if ($this->areAncestorNodeTypeConstraintChecksEnabled()) { $this->requireConstraintsImposedByAncestorsAreMet( - $command->contentStreamIdentifier, + $command->contentStreamId, $nodeType, $command->nodeName, - [$command->parentNodeAggregateIdentifier], + [$command->parentNodeAggregateId], $contentRepository ); } $this->requireProjectedNodeAggregateToNotExist( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $parentNodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->parentNodeAggregateIdentifier, + $command->contentStreamId, + $command->parentNodeAggregateId, $contentRepository ); - if ($command->succeedingSiblingNodeAggregateIdentifier) { + if ($command->succeedingSiblingNodeAggregateId) { $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->succeedingSiblingNodeAggregateIdentifier, + $command->contentStreamId, + $command->succeedingSiblingNodeAggregateId, $contentRepository ); } @@ -203,28 +203,28 @@ private function handleCreateNodeAggregateWithNodeAndSerializedProperties( ); if ($command->nodeName) { $this->requireNodeNameToBeUnoccupied( - $command->contentStreamIdentifier, + $command->contentStreamId, $command->nodeName, - $command->parentNodeAggregateIdentifier, + $command->parentNodeAggregateId, $command->originDimensionSpacePoint, $coveredDimensionSpacePoints, $contentRepository ); } - $descendantNodeAggregateIdentifiers = self::populateNodeAggregateIdentifiers( + $descendantNodeAggregateIds = self::populateNodeAggregateIds( $nodeType, - $command->tetheredDescendantNodeAggregateIdentifiers + $command->tetheredDescendantNodeAggregateIds ); - // Write the auto-created descendant node aggregate identifiers back to the command; + // Write the auto-created descendant node aggregate ids back to the command; // so that when rebasing the command, it stays fully deterministic. - $command = $command->withTetheredDescendantNodeAggregateIdentifiers($descendantNodeAggregateIdentifiers); + $command = $command->withTetheredDescendantNodeAggregateIds($descendantNodeAggregateIds); foreach ( - $descendantNodeAggregateIdentifiers->getNodeAggregateIdentifiers() as $descendantNodeAggregateIdentifier + $descendantNodeAggregateIds->getNodeAggregateIds() as $descendantNodeAggregateId ) { $this->requireProjectedNodeAggregateToNotExist( - $command->contentStreamIdentifier, - $descendantNodeAggregateIdentifier, + $command->contentStreamId, + $descendantNodeAggregateId, $contentRepository ); } @@ -245,14 +245,14 @@ private function handleCreateNodeAggregateWithNodeAndSerializedProperties( $command, $nodeType, $coveredDimensionSpacePoints, - $command->nodeAggregateIdentifier, - $descendantNodeAggregateIdentifiers, + $command->nodeAggregateId, + $descendantNodeAggregateIds, null, $contentRepository ))); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand($command, Events::fromArray($events)), ExpectedVersion::ANY() @@ -269,17 +269,17 @@ private function createRegularWithNode( SerializedPropertyValues $initialPropertyValues ): NodeAggregateWithNodeWasCreated { return new NodeAggregateWithNodeWasCreated( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $command->nodeTypeName, $command->originDimensionSpacePoint, $coveredDimensionSpacePoints, - $command->parentNodeAggregateIdentifier, + $command->parentNodeAggregateId, $command->nodeName, $initialPropertyValues, NodeAggregateClassification::CLASSIFICATION_REGULAR, - $command->initiatingUserIdentifier, - $command->succeedingSiblingNodeAggregateIdentifier + $command->initiatingUserId, + $command->succeedingSiblingNodeAggregateId ); } @@ -293,8 +293,8 @@ private function handleTetheredChildNodes( CreateNodeAggregateWithNodeAndSerializedProperties $command, NodeType $nodeType, DimensionSpacePointSet $coveredDimensionSpacePoints, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, - NodeAggregateIdentifiersByNodePaths $nodeAggregateIdentifiers, + NodeAggregateId $parentNodeAggregateId, + NodeAggregateIdsByNodePaths $nodeAggregateIds, ?NodePath $nodePath, ContentRepository $contentRepository, ): Events { @@ -305,17 +305,17 @@ private function handleTetheredChildNodes( $childNodePath = $nodePath ? $nodePath->appendPathSegment($nodeName) : NodePath::fromString((string) $nodeName); - $childNodeAggregateIdentifier = $nodeAggregateIdentifiers->getNodeAggregateIdentifier($childNodePath) - ?? NodeAggregateIdentifier::create(); + $childNodeAggregateId = $nodeAggregateIds->getNodeAggregateId($childNodePath) + ?? NodeAggregateId::create(); $initialPropertyValues = SerializedPropertyValues::defaultFromNodeType($childNodeType); - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $events[] = $this->createTetheredWithNode( $command, - $childNodeAggregateIdentifier, + $childNodeAggregateId, $childNodeType->name, $coveredDimensionSpacePoints, - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $nodeName, $initialPropertyValues ); @@ -324,8 +324,8 @@ private function handleTetheredChildNodes( $command, $childNodeType, $coveredDimensionSpacePoints, - $childNodeAggregateIdentifier, - $nodeAggregateIdentifiers, + $childNodeAggregateId, + $nodeAggregateIds, $childNodePath, $contentRepository ))); @@ -340,36 +340,36 @@ private function handleTetheredChildNodes( */ private function createTetheredWithNode( CreateNodeAggregateWithNodeAndSerializedProperties $command, - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, NodeTypeName $nodeTypeName, DimensionSpacePointSet $coveredDimensionSpacePoints, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeName $nodeName, SerializedPropertyValues $initialPropertyValues, - NodeAggregateIdentifier $precedingNodeAggregateIdentifier = null + NodeAggregateId $precedingNodeAggregateId = null ): NodeAggregateWithNodeWasCreated { return new NodeAggregateWithNodeWasCreated( - $command->contentStreamIdentifier, - $nodeAggregateIdentifier, + $command->contentStreamId, + $nodeAggregateId, $nodeTypeName, $command->originDimensionSpacePoint, $coveredDimensionSpacePoints, - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $nodeName, $initialPropertyValues, NodeAggregateClassification::CLASSIFICATION_TETHERED, - $command->initiatingUserIdentifier, - $precedingNodeAggregateIdentifier + $command->initiatingUserId, + $precedingNodeAggregateId ); } - protected static function populateNodeAggregateIdentifiers( + protected static function populateNodeAggregateIds( NodeType $nodeType, - ?NodeAggregateIdentifiersByNodePaths $nodeAggregateIdentifiers, + ?NodeAggregateIdsByNodePaths $nodeAggregateIds, NodePath $childPath = null - ): NodeAggregateIdentifiersByNodePaths { - if ($nodeAggregateIdentifiers === null) { - $nodeAggregateIdentifiers = NodeAggregateIdentifiersByNodePaths::createEmpty(); + ): NodeAggregateIdsByNodePaths { + if ($nodeAggregateIds === null) { + $nodeAggregateIds = NodeAggregateIdsByNodePaths::createEmpty(); } // TODO: handle Multiple levels of autocreated child nodes foreach ($nodeType->getAutoCreatedChildNodes() as $rawChildName => $childNodeType) { @@ -377,14 +377,14 @@ protected static function populateNodeAggregateIdentifiers( $childPath = $childPath ? $childPath->appendPathSegment($childName) : NodePath::fromString((string) $childName); - if (!$nodeAggregateIdentifiers->getNodeAggregateIdentifier($childPath)) { - $nodeAggregateIdentifiers = $nodeAggregateIdentifiers->add( + if (!$nodeAggregateIds->getNodeAggregateId($childPath)) { + $nodeAggregateIds = $nodeAggregateIds->add( $childPath, - NodeAggregateIdentifier::create() + NodeAggregateId::create() ); } } - return $nodeAggregateIdentifiers; + return $nodeAggregateIds; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php index baa1714a964..baf398fddca 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php @@ -16,13 +16,13 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Disable the given node aggregate in the given content stream in a dimension space point using a given strategy @@ -33,16 +33,16 @@ final class DisableNodeAggregate implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, /** One of the dimension space points covered by the node aggregate in which the user intends to disable it */ public readonly DimensionSpacePoint $coveredDimensionSpacePoint, /** The strategy the user chose to determine which specialization variants will also be disabled */ public readonly NodeVariantSelectionStrategy $nodeVariantSelectionStrategy, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -52,11 +52,11 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), DimensionSpacePoint::fromArray($array['coveredDimensionSpacePoint']), NodeVariantSelectionStrategy::from($array['nodeVariantSelectionStrategy']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -66,31 +66,31 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'coveredDimensionSpacePoint' => $this->coveredDimensionSpacePoint, 'nodeVariantSelectionStrategy' => $this->nodeVariantSelectionStrategy, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->coveredDimensionSpacePoint, $this->nodeVariantSelectionStrategy, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->coveredDimensionSpacePoint === $nodeIdentifierToPublish->dimensionSpacePoint - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) + $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->coveredDimensionSpacePoint === $nodeIdToPublish->dimensionSpacePoint + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php index a66e2211557..2e3067a5c77 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php @@ -16,13 +16,13 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Enable the given node aggregate in the given content stream in a dimension space point using a given strategy @@ -33,16 +33,16 @@ final class EnableNodeAggregate implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, /** The covered dimension space point of the node aggregate in which the user intends to enable it */ public readonly DimensionSpacePoint $coveredDimensionSpacePoint, /** The strategy the user chose to determine which specialization variants will also be disabled */ public readonly NodeVariantSelectionStrategy $nodeVariantSelectionStrategy, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -52,11 +52,11 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), DimensionSpacePoint::fromArray($array['coveredDimensionSpacePoint']), NodeVariantSelectionStrategy::from($array['nodeVariantSelectionStrategy']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -66,31 +66,31 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'coveredDimensionSpacePoint' => $this->coveredDimensionSpacePoint, 'nodeVariantSelectionStrategy' => $this->nodeVariantSelectionStrategy, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->coveredDimensionSpacePoint, $this->nodeVariantSelectionStrategy, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->coveredDimensionSpacePoint === $nodeIdentifierToPublish->dimensionSpacePoint - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) + $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->coveredDimensionSpacePoint === $nodeIdToPublish->dimensionSpacePoint + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasDisabled.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasDisabled.php index 7360d7e819b..60753b2381c 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasDisabled.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasDisabled.php @@ -15,11 +15,11 @@ namespace Neos\ContentRepository\Core\Feature\NodeDisabling\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -30,54 +30,54 @@ final class NodeAggregateWasDisabled implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, /** The dimension space points the node aggregate was disabled in */ public readonly DimensionSpacePointSet $affectedDimensionSpacePoints, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->affectedDimensionSpacePoints, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): EventInterface { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), DimensionSpacePointSet::fromArray($values['affectedDimensionSpacePoints']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + UserId::fromString($values['initiatingUserId']) ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'affectedDimensionSpacePoints' => $this->affectedDimensionSpacePoints, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasEnabled.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasEnabled.php index 12b159e7c61..765fa9ba27b 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasEnabled.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Event/NodeAggregateWasEnabled.php @@ -15,11 +15,11 @@ namespace Neos\ContentRepository\Core\Feature\NodeDisabling\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -30,53 +30,53 @@ final class NodeAggregateWasEnabled implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly DimensionSpacePointSet $affectedDimensionSpacePoints, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->affectedDimensionSpacePoints, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): EventInterface { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), DimensionSpacePointSet::fromArray($values['affectedDimensionSpacePoints']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + UserId::fromString($values['initiatingUserId']) ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'affectedDimensionSpacePoints' => $this->affectedDimensionSpacePoints, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/NodeDisabling.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/NodeDisabling.php index 01856694367..b132544032a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/NodeDisabling.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/NodeDisabling.php @@ -49,11 +49,11 @@ private function handleDisableNodeAggregate( DisableNodeAggregate $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist($command->coveredDimensionSpacePoint); $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $this->requireNodeAggregateToCoverDimensionSpacePoint( @@ -74,15 +74,15 @@ private function handleDisableNodeAggregate( $events = Events::with( new NodeAggregateWasDisabled( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $affectedDimensionSpacePoints, - $command->initiatingUserIdentifier + $command->initiatingUserId ), ); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, @@ -103,11 +103,11 @@ public function handleEnableNodeAggregate( EnableNodeAggregate $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist($command->coveredDimensionSpacePoint); $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $this->requireNodeAggregateToCoverDimensionSpacePoint( @@ -126,19 +126,17 @@ public function handleEnableNodeAggregate( $this->getInterDimensionalVariationGraph() ); - $contentStreamIdentifier = $command->contentStreamIdentifier; - $events = Events::with( new NodeAggregateWasEnabled( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $affectedDimensionSpacePoints, - $command->initiatingUserIdentifier + $command->initiatingUserId ) ); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier($contentStreamIdentifier)->getEventStreamName(), + ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId)->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand($command, $events), ExpectedVersion::ANY() ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php index 6e6eb75a5ef..10f679cd433 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php @@ -15,24 +15,24 @@ namespace Neos\ContentRepository\Core\Feature\NodeDuplication\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeAggregateIdentifierMapping; +use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeAggregateIdMapping; use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeSubtreeSnapshot; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * CopyNodesRecursively command * - * Creates a new node aggregate with a new node with the given `nodeAggregateIdentifier` and `nodeIdentifier`. - * The node will be appended as child node of the given `parentNodeIdentifier` which must cover the given + * Creates a new node aggregate with a new node with the given `nodeAggregateId` and `nodeId`. + * The node will be appended as child node of the given `parentNodeId` which must cover the given * `dimensionSpacePoint`. * * @api commands are the write-API of the ContentRepository @@ -40,18 +40,18 @@ final class CopyNodesRecursively implements CommandInterface, \JsonSerializable, - MatchableWithNodeIdentifierToPublishOrDiscardInterface, + MatchableWithNodeIdToPublishOrDiscardInterface, RebasableToOtherContentStreamsInterface { private function __construct( /** - * The identifier of the content stream this command is to be handled in + * The id of the content stream this command is to be handled in * - * @var ContentStreamIdentifier + * @var ContentStreamId */ - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamId, /** - * The to be copied node's node aggregate identifier + * The to be copied node's node aggregate id * * @var NodeSubtreeSnapshot */ @@ -62,30 +62,30 @@ private function __construct( * @var OriginDimensionSpacePoint */ public readonly OriginDimensionSpacePoint $targetDimensionSpacePoint, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly UserId $initiatingUserId, /** - * Node aggregate identifier of the target node's parent (optional) + * Node aggregate id of the target node's parent (optional) * * If not given, the node will be added as a root node * - * @var NodeAggregateIdentifier + * @var NodeAggregateId */ - public readonly NodeAggregateIdentifier $targetParentNodeAggregateIdentifier, + public readonly NodeAggregateId $targetParentNodeAggregateId, /** - * Node aggregate identifier of the target node's succeeding sibling (optional) + * Node aggregate id of the target node's succeeding sibling (optional) * * If not given, the node will be added as the parent's first child * - * @var NodeAggregateIdentifier|null + * @var NodeAggregateId|null */ - public readonly ?NodeAggregateIdentifier $targetSucceedingSiblingNodeAggregateIdentifier, + public readonly ?NodeAggregateId $targetSucceedingSiblingNodeAggregateId, /** * the root node name of the root-inserted-node * * @var NodeName|null */ public readonly ?NodeName $targetNodeName, - public readonly NodeAggregateIdentifierMapping $nodeAggregateIdentifierMapping + public readonly NodeAggregateIdMapping $nodeAggregateIdMapping ) { } @@ -96,22 +96,22 @@ public static function createFromSubgraphAndStartNode( ContentSubgraphInterface $subgraph, Node $startNode, OriginDimensionSpacePoint $dimensionSpacePoint, - UserIdentifier $initiatingUserIdentifier, - NodeAggregateIdentifier $targetParentNodeAggregateIdentifier, - ?NodeAggregateIdentifier $targetSucceedingSiblingNodeAggregateIdentifier, + UserId $initiatingUserId, + NodeAggregateId $targetParentNodeAggregateId, + ?NodeAggregateId $targetSucceedingSiblingNodeAggregateId, ?NodeName $targetNodeName ): self { $nodeSubtreeSnapshot = NodeSubtreeSnapshot::fromSubgraphAndStartNode($subgraph, $startNode); return new self( - $subgraph->getContentStreamIdentifier(), + $subgraph->getContentStreamId(), $nodeSubtreeSnapshot, $dimensionSpacePoint, - $initiatingUserIdentifier, - $targetParentNodeAggregateIdentifier, - $targetSucceedingSiblingNodeAggregateIdentifier, + $initiatingUserId, + $targetParentNodeAggregateId, + $targetSucceedingSiblingNodeAggregateId, $targetNodeName, - NodeAggregateIdentifierMapping::generateForNodeSubtreeSnapshot($nodeSubtreeSnapshot) + NodeAggregateIdMapping::generateForNodeSubtreeSnapshot($nodeSubtreeSnapshot) ); } @@ -121,16 +121,16 @@ public static function createFromSubgraphAndStartNode( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), NodeSubtreeSnapshot::fromArray($array['nodeTreeToInsert']), OriginDimensionSpacePoint::fromArray($array['targetDimensionSpacePoint']), - UserIdentifier::fromString($array['initiatingUserIdentifier']), - NodeAggregateIdentifier::fromString($array['targetParentNodeAggregateIdentifier']), - isset($array['targetSucceedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($array['targetSucceedingSiblingNodeAggregateIdentifier']) + UserId::fromString($array['initiatingUserId']), + NodeAggregateId::fromString($array['targetParentNodeAggregateId']), + isset($array['targetSucceedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($array['targetSucceedingSiblingNodeAggregateId']) : null, isset($array['targetNodeName']) ? NodeName::fromString($array['targetNodeName']) : null, - NodeAggregateIdentifierMapping::fromArray($array['nodeAggregateIdentifierMapping']) + NodeAggregateIdMapping::fromArray($array['nodeAggregateIdMapping']) ); } @@ -140,56 +140,56 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, + 'contentStreamId' => $this->contentStreamId, 'nodeTreeToInsert' => $this->nodeTreeToInsert, 'targetDimensionSpacePoint' => $this->targetDimensionSpacePoint, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, - 'targetParentNodeAggregateIdentifier' => $this->targetParentNodeAggregateIdentifier, - 'targetSucceedingSiblingNodeAggregateIdentifier' => $this->targetSucceedingSiblingNodeAggregateIdentifier, + 'initiatingUserId' => $this->initiatingUserId, + 'targetParentNodeAggregateId' => $this->targetParentNodeAggregateId, + 'targetSucceedingSiblingNodeAggregateId' => $this->targetSucceedingSiblingNodeAggregateId, 'targetNodeName' => $this->targetNodeName, - 'nodeAggregateIdentifierMapping' => $this->nodeAggregateIdentifierMapping, + 'nodeAggregateIdMapping' => $this->nodeAggregateIdMapping, ]; } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { - $targetNodeAggregateIdentifier = $this->nodeAggregateIdentifierMapping->getNewNodeAggregateIdentifier( - $this->nodeTreeToInsert->nodeAggregateIdentifier + $targetNodeAggregateId = $this->nodeAggregateIdMapping->getNewNodeAggregateId( + $this->nodeTreeToInsert->nodeAggregateId ); return ( - !is_null($targetNodeAggregateIdentifier) - && $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->targetDimensionSpacePoint->equals($nodeIdentifierToPublish->dimensionSpacePoint) - && $targetNodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) + !is_null($targetNodeAggregateId) + && $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->targetDimensionSpacePoint->equals($nodeIdToPublish->dimensionSpacePoint) + && $targetNodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) ); } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, $this->nodeTreeToInsert, $this->targetDimensionSpacePoint, - $this->initiatingUserIdentifier, - $this->targetParentNodeAggregateIdentifier, - $this->targetSucceedingSiblingNodeAggregateIdentifier, + $this->initiatingUserId, + $this->targetParentNodeAggregateId, + $this->targetSucceedingSiblingNodeAggregateId, $this->targetNodeName, - $this->nodeAggregateIdentifierMapping + $this->nodeAggregateIdMapping ); } - public function withNodeAggregateIdentifierMapping( - NodeAggregateIdentifierMapping $nodeAggregateIdentifierMapping + public function withNodeAggregateIdMapping( + NodeAggregateIdMapping $nodeAggregateIdMapping ): self { return new self( - $this->contentStreamIdentifier, + $this->contentStreamId, $this->nodeTreeToInsert, $this->targetDimensionSpacePoint, - $this->initiatingUserIdentifier, - $this->targetParentNodeAggregateIdentifier, - $this->targetSucceedingSiblingNodeAggregateIdentifier, + $this->initiatingUserId, + $this->targetParentNodeAggregateId, + $this->targetSucceedingSiblingNodeAggregateId, $this->targetNodeName, - $nodeAggregateIdentifierMapping + $nodeAggregateIdMapping ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeAggregateIdMapping.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeAggregateIdMapping.php new file mode 100644 index 00000000000..4b057a9bb89 --- /dev/null +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeAggregateIdMapping.php @@ -0,0 +1,106 @@ + my-main-node} + * + * @var array + */ + protected array $nodeAggregateIds = []; + + /** + * @param array $nodeAggregateIds + */ + public function __construct(array $nodeAggregateIds) + { + foreach ($nodeAggregateIds as $oldNodeAggregateId => $newNodeAggregateId) { + $oldNodeAggregateId = NodeAggregateId::fromString($oldNodeAggregateId); + if (!$newNodeAggregateId instanceof NodeAggregateId) { + throw new \InvalidArgumentException( + 'NodeAggregateIdMapping objects can only be composed of NodeAggregateId.', + 1573042379 + ); + } + + $this->nodeAggregateIds[(string)$oldNodeAggregateId] = $newNodeAggregateId; + } + } + + /** + * Create a new id mapping, *GENERATING* new ids. + */ + public static function generateForNodeSubtreeSnapshot(NodeSubtreeSnapshot $nodeSubtreeSnapshot): self + { + $nodeAggregateIdMapping = []; + $nodeSubtreeSnapshot->walk( + function (NodeSubtreeSnapshot $nodeSubtreeSnapshot) use (&$nodeAggregateIdMapping) { + // here, we create new random NodeAggregateIds. + $nodeAggregateIdMapping[(string)$nodeSubtreeSnapshot->nodeAggregateId] = NodeAggregateId::create(); + } + ); + + return new self($nodeAggregateIdMapping); + } + + /** + * @param array $array + */ + public static function fromArray(array $array): self + { + $nodeAggregateIds = []; + foreach ($array as $oldNodeAggregateId => $newNodeAggregateId) { + $nodeAggregateIds[$oldNodeAggregateId] = NodeAggregateId::fromString($newNodeAggregateId); + } + + return new self($nodeAggregateIds); + } + + public function getNewNodeAggregateId( + NodeAggregateId $oldNodeAggregateId + ): ?NodeAggregateId { + return $this->nodeAggregateIds[(string)$oldNodeAggregateId] ?? null; + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + return $this->nodeAggregateIds; + } + + /** + * @return array + */ + public function getAllNewNodeAggregateIds(): array + { + return array_values($this->nodeAggregateIds); + } +} diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeAggregateIdentifierMapping.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeAggregateIdentifierMapping.php deleted file mode 100644 index 42a382a7072..00000000000 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeAggregateIdentifierMapping.php +++ /dev/null @@ -1,108 +0,0 @@ - my-main-node} - * - * @var array - */ - protected array $nodeAggregateIdentifiers = []; - - /** - * @param array $nodeAggregateIdentifiers - */ - public function __construct(array $nodeAggregateIdentifiers) - { - foreach ($nodeAggregateIdentifiers as $oldNodeAggregateIdentifier => $newNodeAggregateIdentifier) { - $oldNodeAggregateIdentifier = NodeAggregateIdentifier::fromString($oldNodeAggregateIdentifier); - if (!$newNodeAggregateIdentifier instanceof NodeAggregateIdentifier) { - throw new \InvalidArgumentException( - 'NodeAggregateIdentifierMapping objects can only be composed of NodeAggregateIdentifiers.', - 1573042379 - ); - } - - $this->nodeAggregateIdentifiers[(string)$oldNodeAggregateIdentifier] = $newNodeAggregateIdentifier; - } - } - - /** - * Create a new identifier mapping, *GENERATING* new identifiers. - */ - public static function generateForNodeSubtreeSnapshot(NodeSubtreeSnapshot $nodeSubtreeSnapshot): self - { - $nodeAggregateIdentifierMapping = []; - $nodeSubtreeSnapshot->walk( - function (NodeSubtreeSnapshot $nodeSubtreeSnapshot) use (&$nodeAggregateIdentifierMapping) { - // here, we create new random NodeAggregateIdentifiers. - $nodeAggregateIdentifierMapping[(string)$nodeSubtreeSnapshot->nodeAggregateIdentifier] - = NodeAggregateIdentifier::create(); - } - ); - - return new self($nodeAggregateIdentifierMapping); - } - - /** - * @param array $array - */ - public static function fromArray(array $array): self - { - $nodeAggregateIdentifiers = []; - foreach ($array as $oldNodeAggregateIdentifier => $newNodeAggregateIdentifier) { - $nodeAggregateIdentifiers[$oldNodeAggregateIdentifier] - = NodeAggregateIdentifier::fromString($newNodeAggregateIdentifier); - } - - return new self($nodeAggregateIdentifiers); - } - - public function getNewNodeAggregateIdentifier( - NodeAggregateIdentifier $oldNodeAggregateIdentifier - ): ?NodeAggregateIdentifier { - return $this->nodeAggregateIdentifiers[(string)$oldNodeAggregateIdentifier] ?? null; - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - return $this->nodeAggregateIdentifiers; - } - - /** - * @return array - */ - public function getAllNewNodeAggregateIdentifiers(): array - { - return array_values($this->nodeAggregateIdentifiers); - } -} diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php index 6158125d620..7517a9ebfef 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php @@ -4,11 +4,10 @@ namespace Neos\ContentRepository\Core\Feature\NodeDuplication\Dto; -use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeReferencesSnapshot; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\PropertyCollectionInterface; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; @@ -25,7 +24,7 @@ final class NodeSubtreeSnapshot implements \JsonSerializable * @param NodeSubtreeSnapshot[] $childNodes */ private function __construct( - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $nodeTypeName, public readonly ?NodeName $nodeName, public readonly NodeAggregateClassification $nodeAggregateClassification, @@ -45,20 +44,20 @@ private function __construct( public static function fromSubgraphAndStartNode(ContentSubgraphInterface $subgraph, Node $sourceNode): self { $childNodes = []; - foreach ($subgraph->findChildNodes($sourceNode->nodeAggregateIdentifier) as $sourceChildNode) { + foreach ($subgraph->findChildNodes($sourceNode->nodeAggregateId) as $sourceChildNode) { $childNodes[] = self::fromSubgraphAndStartNode($subgraph, $sourceChildNode); } /** @var PropertyCollectionInterface $properties */ $properties = $sourceNode->properties; return new self( - $sourceNode->nodeAggregateIdentifier, + $sourceNode->nodeAggregateId, $sourceNode->nodeTypeName, $sourceNode->nodeName, $sourceNode->classification, $properties->serialized(), NodeReferencesSnapshot::fromReferences( - $subgraph->findReferencedNodes($sourceNode->nodeAggregateIdentifier) + $subgraph->findReferencedNodes($sourceNode->nodeAggregateId) ), $childNodes ); @@ -70,7 +69,7 @@ public static function fromSubgraphAndStartNode(ContentSubgraphInterface $subgra public function jsonSerialize(): array { return [ - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'nodeAggregateId' => $this->nodeAggregateId, 'nodeTypeName' => $this->nodeTypeName, 'nodeName' => $this->nodeName, 'nodeAggregateClassification' => $this->nodeAggregateClassification, @@ -99,7 +98,7 @@ public static function fromArray(array $array): self } return new self( - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['nodeTypeName']), isset($array['nodeName']) ? NodeName::fromString($array['nodeName']) : null, NodeAggregateClassification::from($array['nodeAggregateClassification']), diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/NodeDuplicationCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/NodeDuplicationCommandHandler.php index d06858691d9..f8c1e4c91ae 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/NodeDuplicationCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/NodeDuplicationCommandHandler.php @@ -24,7 +24,7 @@ use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\SharedModel\Exception\NodeConstraintException; use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeSubtreeSnapshot; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; @@ -32,9 +32,9 @@ use Neos\ContentRepository\Core\Feature\Common\ConstraintChecks; use Neos\ContentRepository\Core\Feature\Common\NodeAggregateEventPublisher; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeAggregateIdentifierMapping; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeAggregateIdMapping; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeDuplication\Command\CopyNodesRecursively; use Neos\EventStore\Model\EventStream\ExpectedVersion; @@ -85,7 +85,7 @@ private function handleCopyNodesRecursively( ContentRepository $contentRepository ): EventsToPublish { // Basic constraints (Content Stream / Dimension Space Point / Node Type of to-be-inserted root node) - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist( $command->targetDimensionSpacePoint->toDimensionSpacePoint() ); @@ -96,30 +96,30 @@ private function handleCopyNodesRecursively( // NOTE: we only check this for the *root* node of the to-be-inserted structure; and not for its // children (as we want to create the structure as-is; assuming it was already valid beforehand). $this->requireConstraintsImposedByAncestorsAreMet( - $command->contentStreamIdentifier, + $command->contentStreamId, $nodeType, $command->targetNodeName, - [$command->targetParentNodeAggregateIdentifier], + [$command->targetParentNodeAggregateId], $contentRepository ); - // Constraint: The new nodeAggregateIdentifiers are not allowed to exist yet. - $this->requireNewNodeAggregateIdentifiersToNotExist( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifierMapping, + // Constraint: The new nodeAggregateIds are not allowed to exist yet. + $this->requireNewNodeAggregateIdsToNotExist( + $command->contentStreamId, + $command->nodeAggregateIdMapping, $contentRepository ); // Constraint: the parent node must exist in the command's DimensionSpacePoint as well $parentNodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->targetParentNodeAggregateIdentifier, + $command->contentStreamId, + $command->targetParentNodeAggregateId, $contentRepository ); - if ($command->targetSucceedingSiblingNodeAggregateIdentifier) { + if ($command->targetSucceedingSiblingNodeAggregateId) { $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->targetSucceedingSiblingNodeAggregateIdentifier, + $command->contentStreamId, + $command->targetSucceedingSiblingNodeAggregateId, $contentRepository ); } @@ -140,9 +140,9 @@ private function handleCopyNodesRecursively( // Constraint: The node name must be free in all these dimension space points if ($command->targetNodeName) { $this->requireNodeNameToBeUnoccupied( - $command->contentStreamIdentifier, + $command->contentStreamId, $command->targetNodeName, - $command->targetParentNodeAggregateIdentifier, + $command->targetParentNodeAggregateId, $command->targetDimensionSpacePoint, $coveredDimensionSpacePoints, $contentRepository @@ -152,21 +152,21 @@ private function handleCopyNodesRecursively( // Now, we can start creating the recursive structure. $events = []; $this->createEventsForNodeToInsert( - $command->contentStreamIdentifier, + $command->contentStreamId, $command->targetDimensionSpacePoint, $coveredDimensionSpacePoints, - $command->targetParentNodeAggregateIdentifier, - $command->targetSucceedingSiblingNodeAggregateIdentifier, + $command->targetParentNodeAggregateId, + $command->targetSucceedingSiblingNodeAggregateId, $command->targetNodeName, $command->nodeTreeToInsert, - $command->nodeAggregateIdentifierMapping, - $command->initiatingUserIdentifier, + $command->nodeAggregateIdMapping, + $command->initiatingUserId, $events ); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier( - $command->contentStreamIdentifier + ContentStreamEventStreamName::fromContentStreamId( + $command->contentStreamId )->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, @@ -176,15 +176,15 @@ private function handleCopyNodesRecursively( ); } - private function requireNewNodeAggregateIdentifiersToNotExist( - ContentStreamIdentifier $contentStreamIdentifier, - Dto\NodeAggregateIdentifierMapping $nodeAggregateIdentifierMapping, + private function requireNewNodeAggregateIdsToNotExist( + ContentStreamId $contentStreamId, + Dto\NodeAggregateIdMapping $nodeAggregateIdMapping, ContentRepository $contentRepository ): void { - foreach ($nodeAggregateIdentifierMapping->getAllNewNodeAggregateIdentifiers() as $nodeAggregateIdentifier) { + foreach ($nodeAggregateIdMapping->getAllNewNodeAggregateIds() as $nodeAggregateId) { $this->requireProjectedNodeAggregateToNotExist( - $contentStreamIdentifier, - $nodeAggregateIdentifier, + $contentStreamId, + $nodeAggregateId, $contentRepository ); } @@ -194,48 +194,48 @@ private function requireNewNodeAggregateIdentifiersToNotExist( * @param array $events */ private function createEventsForNodeToInsert( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, OriginDimensionSpacePoint $originDimensionSpacePoint, DimensionSpacePointSet $coveredDimensionSpacePoints, - NodeAggregateIdentifier $targetParentNodeAggregateIdentifier, - ?NodeAggregateIdentifier $targetSucceedingSiblingNodeAggregateIdentifier, + NodeAggregateId $targetParentNodeAggregateId, + ?NodeAggregateId $targetSucceedingSiblingNodeAggregateId, ?NodeName $targetNodeName, NodeSubtreeSnapshot $nodeToInsert, - Dto\NodeAggregateIdentifierMapping $nodeAggregateIdentifierMapping, - UserIdentifier $initiatingUserIdentifier, + Dto\NodeAggregateIdMapping $nodeAggregateIdMapping, + UserId $initiatingUserId, array &$events ): void { $events[] = new NodeAggregateWithNodeWasCreated( - $contentStreamIdentifier, - $nodeAggregateIdentifierMapping->getNewNodeAggregateIdentifier( - $nodeToInsert->nodeAggregateIdentifier - ) ?: NodeAggregateIdentifier::create(), + $contentStreamId, + $nodeAggregateIdMapping->getNewNodeAggregateId( + $nodeToInsert->nodeAggregateId + ) ?: NodeAggregateId::create(), $nodeToInsert->nodeTypeName, $originDimensionSpacePoint, $coveredDimensionSpacePoints, - $targetParentNodeAggregateIdentifier, + $targetParentNodeAggregateId, $targetNodeName, $nodeToInsert->propertyValues, $nodeToInsert->nodeAggregateClassification, - $initiatingUserIdentifier, - $targetSucceedingSiblingNodeAggregateIdentifier + $initiatingUserId, + $targetSucceedingSiblingNodeAggregateId ); foreach ($nodeToInsert->childNodes as $childNodeToInsert) { $this->createEventsForNodeToInsert( - $contentStreamIdentifier, + $contentStreamId, $originDimensionSpacePoint, $coveredDimensionSpacePoints, - // the just-inserted node becomes the new parent node Identifier - $nodeAggregateIdentifierMapping->getNewNodeAggregateIdentifier( - $nodeToInsert->nodeAggregateIdentifier - ) ?: NodeAggregateIdentifier::create(), + // the just-inserted node becomes the new parent node ID + $nodeAggregateIdMapping->getNewNodeAggregateId( + $nodeToInsert->nodeAggregateId + ) ?: NodeAggregateId::create(), // $childNodesToInsert is already in the correct order; so appending only is fine. null, $childNodeToInsert->nodeName, $childNodeToInsert, - $nodeAggregateIdentifierMapping, - $initiatingUserIdentifier, + $nodeAggregateIdMapping, + $initiatingUserId, $events ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php index 3ea944be9db..ef8b5c925b6 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php @@ -15,12 +15,12 @@ namespace Neos\ContentRepository\Core\Feature\NodeModification\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Set property values for a given node. @@ -36,25 +36,11 @@ final class SetNodeProperties implements CommandInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, public readonly PropertyValuesToWrite $propertyValues, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - - /** - * @param array $array - */ - public static function fromArray(array $array): self - { - return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), - OriginDimensionSpacePoint::fromArray($array['originDimensionSpacePoint']), - PropertyValuesToWrite::fromArray($array['propertyValues']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) - ); - } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php index a1019d52e9a..981f89717d3 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php @@ -15,12 +15,12 @@ namespace Neos\ContentRepository\Core\Feature\NodeModification\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; @@ -35,14 +35,14 @@ final class SetSerializedNodeProperties implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, public readonly SerializedPropertyValues $propertyValues, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -52,11 +52,11 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($array['originDimensionSpacePoint']), SerializedPropertyValues::fromArray($array['propertyValues']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -67,31 +67,31 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'originDimensionSpacePoint' => $this->originDimensionSpacePoint, 'propertyValues' => $this->propertyValues, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->originDimensionSpacePoint, $this->propertyValues, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->originDimensionSpacePoint->equals($nodeIdentifierToPublish->dimensionSpacePoint) - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) + $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->originDimensionSpacePoint->equals($nodeIdToPublish->dimensionSpacePoint) + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Event/NodePropertiesWereSet.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Event/NodePropertiesWereSet.php index 31a218ec3a0..38f60b0d001 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Event/NodePropertiesWereSet.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Event/NodePropertiesWereSet.php @@ -14,13 +14,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeModification\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -37,25 +37,25 @@ final class NodePropertiesWereSet implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, public readonly SerializedPropertyValues $propertyValues, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } public function getOriginDimensionSpacePoint(): OriginDimensionSpacePoint @@ -63,47 +63,47 @@ public function getOriginDimensionSpacePoint(): OriginDimensionSpacePoint return $this->originDimensionSpacePoint; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->originDimensionSpacePoint, $this->propertyValues, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public function mergeProperties(self $other): self { return new self( - $this->contentStreamIdentifier, - $this->nodeAggregateIdentifier, + $this->contentStreamId, + $this->nodeAggregateId, $this->originDimensionSpacePoint, $this->propertyValues->merge($other->propertyValues), - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): EventInterface { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($values['originDimensionSpacePoint']), SerializedPropertyValues::fromArray($values['propertyValues']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + UserId::fromString($values['initiatingUserId']) ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'originDimensionSpacePoint' => $this->originDimensionSpacePoint, 'propertyValues' => $this->propertyValues, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/NodeModification.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/NodeModification.php index 5e18906bd91..db3e5286e6d 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/NodeModification.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/NodeModification.php @@ -18,9 +18,9 @@ use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\NodeType\NodeType; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetNodeProperties; @@ -39,8 +39,8 @@ trait NodeModification abstract protected function requireNodeType(NodeTypeName $nodeTypeName): NodeType; abstract protected function requireProjectedNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository ): NodeAggregate; @@ -48,11 +48,11 @@ private function handleSetNodeProperties( SetNodeProperties $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist($command->originDimensionSpacePoint->toDimensionSpacePoint()); $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $this->requireNodeAggregateToNotBeRoot($nodeAggregate); @@ -61,14 +61,14 @@ private function handleSetNodeProperties( $this->validateProperties($command->propertyValues, $nodeTypeName); $lowLevelCommand = new SetSerializedNodeProperties( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $command->originDimensionSpacePoint, $this->getPropertyConverter()->serializePropertyValues( $command->propertyValues, $this->requireNodeType($nodeTypeName) ), - $command->initiatingUserIdentifier + $command->initiatingUserId ); return $this->handleSetSerializedNodeProperties($lowLevelCommand, $contentRepository); @@ -80,8 +80,8 @@ private function handleSetSerializedNodeProperties( ): EventsToPublish { // Check if node exists $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $nodeType = $this->requireNodeType($nodeAggregate->nodeTypeName); @@ -97,18 +97,18 @@ private function handleSetSerializedNodeProperties( ); foreach ($affectedOrigins as $affectedOrigin) { $events[] = new NodePropertiesWereSet( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $affectedOrigin, $propertyValues, - $command->initiatingUserIdentifier + $command->initiatingUserId ); } } $events = $this->mergeSplitEvents($events); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php index 296f4830b48..a1d5c5bcea2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php @@ -15,29 +15,29 @@ namespace Neos\ContentRepository\Core\Feature\NodeMove\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\RelationDistributionStrategy; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * The "Move node aggregate" command * - * In `contentStreamIdentifier` + * In `contentStreamId` * and `dimensionSpacePoint`, - * move node aggregate `nodeAggregateIdentifier` - * into `newParentNodeAggregateIdentifier` (or keep the current parent) - * between `newPrecedingSiblingNodeAggregateIdentifier` - * and `newSucceedingSiblingNodeAggregateIdentifier` (or as last of all siblings) + * move node aggregate `nodeAggregateId` + * into `newParentNodeAggregateId` (or keep the current parent) + * between `newPrecedingSiblingNodeAggregateId` + * and `newSucceedingSiblingNodeAggregateId` (or as last of all siblings) * using `relationDistributionStrategy` - * initiated by `initiatingUserIdentifier` + * initiated by `initiatingUserId` * - * Why can you specify **both** newPrecedingSiblingNodeAggregateIdentifier - * and newSucceedingSiblingNodeAggregateIdentifier? + * Why can you specify **both** newPrecedingSiblingNodeAggregateId + * and newSucceedingSiblingNodeAggregateId? * - it can happen that in one subgraph, only one of these match. * - See the PHPDoc of the attributes (a few lines down) for the exact behavior. * @@ -47,13 +47,13 @@ final class MoveNodeAggregate implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( /** * The content stream in which the move operation is to be performed */ - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamId, /** * This is one of the *covered* dimension space points of the node aggregate * and not necessarily one of the occupied ones. @@ -63,32 +63,32 @@ public function __construct( /** * The node aggregate to be moved */ - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateId, /** - * This is the identifier of the new parent node aggregate. + * This is the id of the new parent node aggregate. * If given, it enforces that all nodes in the given aggregate are moved into nodes of the parent aggregate, * even if the given siblings belong to other parents. In latter case, those siblings are ignored. */ - public readonly ?NodeAggregateIdentifier $newParentNodeAggregateIdentifier, + public readonly ?NodeAggregateId $newParentNodeAggregateId, /** - * This is the identifier of the new preceding sibling node aggregate. + * This is the id of the new preceding sibling node aggregate. * If given and no successor found, it is attempted to insert the moved nodes right after nodes of this * aggregate. * In dimension space points this aggregate does not cover, other siblings, * in order of proximity, are tried to be used instead. */ - public readonly ?NodeAggregateIdentifier $newPrecedingSiblingNodeAggregateIdentifier, + public readonly ?NodeAggregateId $newPrecedingSiblingNodeAggregateId, /** - * This is the identifier of the new succeeding sibling node aggregate. + * This is the id of the new succeeding sibling node aggregate. * If given, it is attempted to insert the moved nodes right before nodes of this aggregate. * In dimension space points this aggregate does not cover, the preceding sibling is tried to be used instead. */ - public readonly ?NodeAggregateIdentifier $newSucceedingSiblingNodeAggregateIdentifier, + public readonly ?NodeAggregateId $newSucceedingSiblingNodeAggregateId, /** * The relation distribution strategy to be used */ public readonly RelationDistributionStrategy $relationDistributionStrategy, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -98,20 +98,20 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), DimensionSpacePoint::fromArray($array['dimensionSpacePoint']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), - isset($array['newParentNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($array['newParentNodeAggregateIdentifier']) + NodeAggregateId::fromString($array['nodeAggregateId']), + isset($array['newParentNodeAggregateId']) + ? NodeAggregateId::fromString($array['newParentNodeAggregateId']) : null, - isset($array['newPrecedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($array['newPrecedingSiblingNodeAggregateIdentifier']) + isset($array['newPrecedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($array['newPrecedingSiblingNodeAggregateId']) : null, - isset($array['newSucceedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($array['newSucceedingSiblingNodeAggregateIdentifier']) + isset($array['newSucceedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($array['newSucceedingSiblingNodeAggregateId']) : null, RelationDistributionStrategy::fromString($array['relationDistributionStrategy']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -121,35 +121,35 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, + 'contentStreamId' => $this->contentStreamId, 'dimensionSpacePoint' => $this->dimensionSpacePoint, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, - 'newParentNodeAggregateIdentifier' => $this->newParentNodeAggregateIdentifier, - 'newPrecedingSiblingNodeAggregateIdentifier' => $this->newPrecedingSiblingNodeAggregateIdentifier, - 'newSucceedingSiblingNodeAggregateIdentifier' => $this->newSucceedingSiblingNodeAggregateIdentifier, + 'nodeAggregateId' => $this->nodeAggregateId, + 'newParentNodeAggregateId' => $this->newParentNodeAggregateId, + 'newPrecedingSiblingNodeAggregateId' => $this->newPrecedingSiblingNodeAggregateId, + 'newSucceedingSiblingNodeAggregateId' => $this->newSucceedingSiblingNodeAggregateId, 'relationDistributionStrategy' => $this->relationDistributionStrategy, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, $this->dimensionSpacePoint, - $this->nodeAggregateIdentifier, - $this->newParentNodeAggregateIdentifier, - $this->newPrecedingSiblingNodeAggregateIdentifier, - $this->newSucceedingSiblingNodeAggregateIdentifier, + $this->nodeAggregateId, + $this->newParentNodeAggregateId, + $this->newPrecedingSiblingNodeAggregateId, + $this->newSucceedingSiblingNodeAggregateId, $this->relationDistributionStrategy, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { - return $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) - && $this->dimensionSpacePoint === $nodeIdentifierToPublish->dimensionSpacePoint; + return $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) + && $this->dimensionSpacePoint === $nodeIdToPublish->dimensionSpacePoint; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Dto/NodeVariantAssignment.php b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Dto/NodeVariantAssignment.php index d96428182c2..06e2d709e19 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Dto/NodeVariantAssignment.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Dto/NodeVariantAssignment.php @@ -15,10 +15,10 @@ namespace Neos\ContentRepository\Core\Feature\NodeMove\Dto; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** - * A node variant assignment, identifying a node variant by node aggregate identifier and origin dimension space point. + * A node variant assignment, identifying a node variant by node aggregate id and origin dimension space point. * * This is used in structural operations like node move to assign a new node within the same content stream * as a new parent, sibling etc. @@ -30,7 +30,7 @@ final class NodeVariantAssignment implements \JsonSerializable { public function __construct( - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $originDimensionSpacePoint ) { } @@ -41,7 +41,7 @@ public function __construct( public static function createFromArray(array $array): self { return new self( - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + NodeAggregateId::fromString($array['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($array['originDimensionSpacePoint']) ); } @@ -52,7 +52,7 @@ public static function createFromArray(array $array): self public function jsonSerialize(): array { return [ - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'nodeAggregateId' => $this->nodeAggregateId, 'originDimensionSpacePoint' => $this->originDimensionSpacePoint, ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Event/NodeAggregateWasMoved.php b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Event/NodeAggregateWasMoved.php index 1aecaa372c5..54e6cd5e4c7 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Event/NodeAggregateWasMoved.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Event/NodeAggregateWasMoved.php @@ -6,17 +6,17 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeMoveMappings; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** * A node aggregate was moved in a content stream as defined in the node move mappings. * - * We always move a node aggregate (in a given ContentStreamIdentifier, identified by a NodeAggregateIdentifier). + * We always move a node aggregate (in a given ContentStreamId, identified by a NodeAggregateId). * * You can move any amount of nodes in the aggregate. * The targets (new parents // new succeeding) for each node & dimension space point @@ -27,14 +27,14 @@ final class NodeAggregateWasMoved implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, /** * The MoveNodeMappings contains for every OriginDimensionSpacePoint of the aggregate which should be moved, - * a list of new parent NodeAggregateIdentifiers, and a list of new succeeding-sibling NodeAggregateIdentifiers. + * a list of new parent NodeAggregateIds, and a list of new succeeding-sibling NodeAggregateIds. * * This happens between * MoveNodeMappings @@ -45,7 +45,7 @@ public function __construct( * -> !!! this might be multiple DIFFERENT ones, because one OriginDimensionSpacePoint might shine through * into different covered dimensions, and there it might be at a different location. * the KEY here is the COVERED DSP Hash (!!!) - TODO should be fixed - * the value is the Identifier + Origin Dimension Space Point OF THE PARENT + * the value is the Id + Origin Dimension Space Point OF THE PARENT * * @var NodeMoveMappings|null */ @@ -60,50 +60,50 @@ public function __construct( * @var DimensionSpacePointSet */ public readonly DimensionSpacePointSet $repositionNodesWithoutAssignments, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->nodeMoveMappings, $this->repositionNodesWithoutAssignments, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), NodeMoveMappings::fromArray($values['nodeMoveMappings']), DimensionSpacePointSet::fromArray($values['repositionNodesWithoutAssignments']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + UserId::fromString($values['initiatingUserId']) ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'nodeMoveMappings' => $this->nodeMoveMappings, 'repositionNodesWithoutAssignments' => $this->repositionNodesWithoutAssignments, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/NodeMove.php b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/NodeMove.php index 35e06143dd6..53fa12698b1 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/NodeMove.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/NodeMove.php @@ -22,8 +22,8 @@ use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeMove\Command\MoveNodeAggregate; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\DimensionSpace; use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamDoesNotExistYet; @@ -53,8 +53,8 @@ abstract protected function getInterDimensionalVariationGraph(): DimensionSpace\ abstract protected function areAncestorNodeTypeConstraintChecksEnabled(): bool; abstract protected function requireProjectedNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository ): NodeAggregate; @@ -71,11 +71,11 @@ private function handleMoveNodeAggregate( MoveNodeAggregate $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist($command->dimensionSpacePoint); $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $this->requireNodeAggregateToNotBeRoot($nodeAggregate); @@ -88,26 +88,26 @@ private function handleMoveNodeAggregate( $command->dimensionSpacePoint ); - if ($command->newParentNodeAggregateIdentifier) { + if ($command->newParentNodeAggregateId) { $this->requireConstraintsImposedByAncestorsAreMet( - $command->contentStreamIdentifier, + $command->contentStreamId, $this->requireNodeType($nodeAggregate->nodeTypeName), $nodeAggregate->nodeName, - [$command->newParentNodeAggregateIdentifier], + [$command->newParentNodeAggregateId], $contentRepository ); $this->requireNodeNameToBeUncovered( - $command->contentStreamIdentifier, + $command->contentStreamId, $nodeAggregate->nodeName, - $command->newParentNodeAggregateIdentifier, + $command->newParentNodeAggregateId, $affectedDimensionSpacePoints, $contentRepository ); $newParentNodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->newParentNodeAggregateIdentifier, + $command->contentStreamId, + $command->newParentNodeAggregateId, $contentRepository ); @@ -117,24 +117,24 @@ private function handleMoveNodeAggregate( ); $this->requireNodeAggregateToNotBeDescendant( - $command->contentStreamIdentifier, + $command->contentStreamId, $newParentNodeAggregate, $nodeAggregate, $contentRepository ); } - if ($command->newPrecedingSiblingNodeAggregateIdentifier) { + if ($command->newPrecedingSiblingNodeAggregateId) { $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->newPrecedingSiblingNodeAggregateIdentifier, + $command->contentStreamId, + $command->newPrecedingSiblingNodeAggregateId, $contentRepository ); } - if ($command->newSucceedingSiblingNodeAggregateIdentifier) { + if ($command->newSucceedingSiblingNodeAggregateId) { $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->newSucceedingSiblingNodeAggregateIdentifier, + $command->contentStreamId, + $command->newSucceedingSiblingNodeAggregateId, $contentRepository ); } @@ -145,19 +145,19 @@ private function handleMoveNodeAggregate( foreach ($nodeAggregate->occupiedDimensionSpacePoints as $occupiedDimensionSpacePoint) { $succeedingSiblingAssignments[$occupiedDimensionSpacePoint->hash] = $this->resolveNewSucceedingSiblingsAssignments( - $command->contentStreamIdentifier, + $command->contentStreamId, $nodeAggregate, - $command->newParentNodeAggregateIdentifier, - $command->newPrecedingSiblingNodeAggregateIdentifier, - $command->newSucceedingSiblingNodeAggregateIdentifier, + $command->newParentNodeAggregateId, + $command->newPrecedingSiblingNodeAggregateId, + $command->newSucceedingSiblingNodeAggregateId, $occupiedDimensionSpacePoint, $affectedDimensionSpacePoints, $contentRepository ); $parentAssignments[$occupiedDimensionSpacePoint->hash] = $this->resolveNewParentAssignments( - $command->contentStreamIdentifier, + $command->contentStreamId, $nodeAggregate, - $command->newParentNodeAggregateIdentifier, + $command->newParentNodeAggregateId, $succeedingSiblingAssignments[$occupiedDimensionSpacePoint->hash], $occupiedDimensionSpacePoint, $affectedDimensionSpacePoints, @@ -174,20 +174,20 @@ private function handleMoveNodeAggregate( $events = Events::with( new NodeAggregateWasMoved( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $nodeMoveMappings, - !$command->newParentNodeAggregateIdentifier - && !$command->newSucceedingSiblingNodeAggregateIdentifier - && !$command->newPrecedingSiblingNodeAggregateIdentifier + !$command->newParentNodeAggregateId + && !$command->newSucceedingSiblingNodeAggregateId + && !$command->newPrecedingSiblingNodeAggregateId ? $affectedDimensionSpacePoints : new DimensionSpacePointSet([]), - $command->initiatingUserIdentifier + $command->initiatingUserId ) ); - $contentStreamEventStreamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $command->contentStreamIdentifier + $contentStreamEventStreamName = ContentStreamEventStreamName::fromContentStreamId( + $command->contentStreamId ); ; @@ -210,10 +210,10 @@ private function handleMoveNodeAggregate( */ private function resolveNewParentAssignments( /** The content stream the move operation is performed in */ - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeAggregate $nodeAggregate, - /** The parent node aggregate's identifier if defined */ - ?NodeAggregateIdentifier $parentIdentifier, + /** The parent node aggregate's id if defined */ + ?NodeAggregateId $parentId, /** The already determined new succeeding siblings */ NodeVariantAssignments $succeedingSiblingAssignments, /** A dimension space point occupied by the node aggregate to be moved */ @@ -222,8 +222,8 @@ private function resolveNewParentAssignments( ContentRepository $contentRepository ): NodeVariantAssignments { $parents = NodeVariantAssignments::create(); - if ($parentIdentifier) { - // if a parent node aggregate identifier is explicitly given, + if ($parentId) { + // if a parent node aggregate ID is explicitly given, // then all variants are assigned to it as children foreach ( $nodeAggregate->getCoverageByOccupant($originDimensionSpacePoint) @@ -231,7 +231,7 @@ private function resolveNewParentAssignments( ) { $parents = $parents->add( new NodeVariantAssignment( - $parentIdentifier, + $parentId, $originDimensionSpacePoint ), $coveredDimensionSpacePoint @@ -242,15 +242,15 @@ private function resolveNewParentAssignments( $visibilityConstraints = VisibilityConstraints::withoutRestrictions(); $originSubgraph = $contentRepository->getContentGraph()->getSubgraph( - $contentStreamIdentifier, + $contentStreamId, $originDimensionSpacePoint->toDimensionSpacePoint(), $visibilityConstraints ); - $originParent = $originSubgraph->findParentNode($nodeAggregate->nodeAggregateIdentifier); + $originParent = $originSubgraph->findParentNode($nodeAggregate->nodeAggregateId); if (is_null($originParent)) { throw new \InvalidArgumentException( 'Could not find parent for origin ' - . $nodeAggregate->nodeAggregateIdentifier + . $nodeAggregate->nodeAggregateId . ' in subgraph ' . json_encode($originSubgraph), 1645367254 ); @@ -259,26 +259,26 @@ private function resolveNewParentAssignments( /** @var DimensionSpace\DimensionSpacePoint $affectedDimensionSpacePoint */ $affectedDimensionSpacePoint = $affectedDimensionSpacePoints[$coveredDimensionSpacePointHash]; $contentSubgraph = $contentRepository->getContentGraph()->getSubgraph( - $contentStreamIdentifier, + $contentStreamId, $affectedDimensionSpacePoint, $visibilityConstraints ); - $parentNode = $contentSubgraph->findParentNode($succeedingSiblingAssignment->nodeAggregateIdentifier); + $parentNode = $contentSubgraph->findParentNode($succeedingSiblingAssignment->nodeAggregateId); if (is_null($parentNode)) { throw new \InvalidArgumentException( 'Could not find parent for succeeding sibling ' - . $succeedingSiblingAssignment->nodeAggregateIdentifier + . $succeedingSiblingAssignment->nodeAggregateId . ' in subgraph ' . json_encode($contentSubgraph), 1645367254 ); } - if (!$parentNode->nodeAggregateIdentifier->equals($originParent->nodeAggregateIdentifier)) { + if (!$parentNode->nodeAggregateId->equals($originParent->nodeAggregateId)) { /** @var DimensionSpace\DimensionSpacePoint $dimensionSpacePoint */ $dimensionSpacePoint = $affectedDimensionSpacePoints[$coveredDimensionSpacePointHash]; $parents = $parents->add( new NodeVariantAssignment( - $parentNode->nodeAggregateIdentifier, + $parentNode->nodeAggregateId, $parentNode->originDimensionSpacePoint ), $dimensionSpacePoint @@ -315,15 +315,15 @@ private function resolveAffectedDimensionSpacePointSet( */ private function resolveNewSucceedingSiblingsAssignments( /** The content stream the move operation is performed in */ - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, /** The node aggregate to be moved */ NodeAggregate $nodeAggregate, - /** The parent node aggregate identifier, has precedence over siblings when in doubt */ - ?NodeAggregateIdentifier $parentIdentifier, - /** The planned preceding sibling's node aggregate identifier */ - ?NodeAggregateIdentifier $precedingSiblingIdentifier, - /** The planned succeeding sibling's node aggregate identifier */ - ?NodeAggregateIdentifier $succeedingSiblingIdentifier, + /** The parent node aggregate id, has precedence over siblings when in doubt */ + ?NodeAggregateId $parentId, + /** The planned preceding sibling's node aggregate id */ + ?NodeAggregateId $precedingSiblingId, + /** The planned succeeding sibling's node aggregate id */ + ?NodeAggregateId $succeedingSiblingId, /** A dimension space point occupied by the node aggregate to be moved */ OriginDimensionSpacePoint $originDimensionSpacePoint, /** The dimension space points affected by the move operation */ @@ -331,13 +331,13 @@ private function resolveNewSucceedingSiblingsAssignments( ContentRepository $contentRepository ): NodeVariantAssignments { $succeedingSiblings = NodeVariantAssignments::create(); - if (!$precedingSiblingIdentifier && !$succeedingSiblingIdentifier) { + if (!$precedingSiblingId && !$succeedingSiblingId) { return $succeedingSiblings; } $visibilityConstraints = VisibilityConstraints::withoutRestrictions(); $originContentSubgraph = $contentRepository->getContentGraph()->getSubgraph( - $contentStreamIdentifier, + $contentStreamId, $originDimensionSpacePoint->toDimensionSpacePoint(), $visibilityConstraints ); @@ -346,21 +346,21 @@ private function resolveNewSucceedingSiblingsAssignments( ->getIntersection($affectedDimensionSpacePoints) as $dimensionSpacePoint ) { $contentSubgraph = $contentRepository->getContentGraph()->getSubgraph( - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint, $visibilityConstraints ); - $succeedingSibling = $succeedingSiblingIdentifier - ? $this->findSibling($contentSubgraph, $parentIdentifier, $succeedingSiblingIdentifier) + $succeedingSibling = $succeedingSiblingId + ? $this->findSibling($contentSubgraph, $parentId, $succeedingSiblingId) : null; if (!$succeedingSibling) { - $precedingSibling = $precedingSiblingIdentifier - ? $this->findSibling($contentSubgraph, $parentIdentifier, $precedingSiblingIdentifier) + $precedingSibling = $precedingSiblingId + ? $this->findSibling($contentSubgraph, $parentId, $precedingSiblingId) : null; - if ($precedingSiblingIdentifier && $precedingSibling) { + if ($precedingSiblingId && $precedingSibling) { $alternateSucceedingSiblings = $contentSubgraph->findSucceedingSiblings( - $precedingSiblingIdentifier, + $precedingSiblingId, null, 1 ); @@ -369,10 +369,10 @@ private function resolveNewSucceedingSiblingsAssignments( } } else { $succeedingSibling = $this->resolveSucceedingSiblingFromOriginSiblings( - $nodeAggregate->nodeAggregateIdentifier, - $parentIdentifier, - $precedingSiblingIdentifier, - $succeedingSiblingIdentifier, + $nodeAggregate->nodeAggregateId, + $parentId, + $precedingSiblingId, + $succeedingSiblingId, $contentSubgraph, $originContentSubgraph ); @@ -382,7 +382,7 @@ private function resolveNewSucceedingSiblingsAssignments( if ($succeedingSibling) { $succeedingSiblings = $succeedingSiblings->add( new NodeVariantAssignment( - $succeedingSibling->nodeAggregateIdentifier, + $succeedingSibling->nodeAggregateId, $succeedingSibling->originDimensionSpacePoint ), $dimensionSpacePoint @@ -395,20 +395,20 @@ private function resolveNewSucceedingSiblingsAssignments( private function findSibling( ContentSubgraphInterface $contentSubgraph, - ?NodeAggregateIdentifier $parentIdentifier, - NodeAggregateIdentifier $siblingIdentifier + ?NodeAggregateId $parentId, + NodeAggregateId $siblingId ): ?Node { - $siblingCandidate = $contentSubgraph->findNodeByNodeAggregateIdentifier($siblingIdentifier); - if ($parentIdentifier && $siblingCandidate) { + $siblingCandidate = $contentSubgraph->findNodeByNodeAggregateId($siblingId); + if ($parentId && $siblingCandidate) { // If a parent node aggregate is explicitly given, all siblings must have this parent - $parent = $contentSubgraph->findParentNode($siblingIdentifier); + $parent = $contentSubgraph->findParentNode($siblingId); if (is_null($parent)) { throw new \InvalidArgumentException( - 'Parent ' . $parentIdentifier . ' not found in subgraph ' . json_encode($contentSubgraph), + 'Parent ' . $parentId . ' not found in subgraph ' . json_encode($contentSubgraph), 1645366837 ); } - if ($parent->nodeAggregateIdentifier->equals($parentIdentifier)) { + if ($parent->nodeAggregateId->equals($parentId)) { return $siblingCandidate; } } else { @@ -419,49 +419,51 @@ private function findSibling( } private function resolveSucceedingSiblingFromOriginSiblings( - NodeAggregateIdentifier $nodeAggregateIdentifier, - ?NodeAggregateIdentifier $parentIdentifier, - ?NodeAggregateIdentifier $precedingSiblingIdentifier, - ?NodeAggregateIdentifier $succeedingSiblingIdentifier, + NodeAggregateId $nodeAggregateId, + ?NodeAggregateId $parentId, + ?NodeAggregateId $precedingSiblingId, + ?NodeAggregateId $succeedingSiblingId, ContentSubgraphInterface $currentContentSubgraph, ContentSubgraphInterface $originContentSubgraph ): ?Node { $succeedingSibling = null; - $precedingSiblingCandidates = iterator_to_array($precedingSiblingIdentifier - ? $originContentSubgraph->findPrecedingSiblings($precedingSiblingIdentifier) + $precedingSiblingCandidates = iterator_to_array($precedingSiblingId + ? $originContentSubgraph->findPrecedingSiblings($precedingSiblingId) : Nodes::createEmpty()); - $succeedingSiblingCandidates = iterator_to_array($succeedingSiblingIdentifier - ? $originContentSubgraph->findSucceedingSiblings($succeedingSiblingIdentifier) + $succeedingSiblingCandidates = iterator_to_array($succeedingSiblingId + ? $originContentSubgraph->findSucceedingSiblings($succeedingSiblingId) : Nodes::createEmpty()); + /* @var $precedingSiblingCandidates Node[] */ + /* @var $succeedingSiblingCandidates Node[] */ $maximumIndex = max(count($succeedingSiblingCandidates), count($precedingSiblingCandidates)); for ($i = 0; $i < $maximumIndex; $i++) { // try successors of same distance first if (isset($succeedingSiblingCandidates[$i])) { - if ($succeedingSiblingCandidates[$i]->nodeAggregateIdentifier->equals($nodeAggregateIdentifier)) { + if ($succeedingSiblingCandidates[$i]->nodeAggregateId->equals($nodeAggregateId)) { \array_splice($succeedingSiblingCandidates, $i, 1); } $succeedingSibling = $this->findSibling( $currentContentSubgraph, - $parentIdentifier, - $succeedingSiblingCandidates[$i]->nodeAggregateIdentifier + $parentId, + $succeedingSiblingCandidates[$i]->nodeAggregateId ); if ($succeedingSibling) { break; } } if (isset($precedingSiblingCandidates[$i])) { - /** @var NodeAggregateIdentifier $precedingSiblingIdentifier can only be the case if not null */ - if ($precedingSiblingCandidates[$i]->nodeAggregateIdentifier->equals($nodeAggregateIdentifier)) { + /** @var NodeAggregateId $precedingSiblingId can only be the case if not null */ + if ($precedingSiblingCandidates[$i]->nodeAggregateId->equals($nodeAggregateId)) { \array_splice($precedingSiblingCandidates, $i, 1); } $precedingSibling = $this->findSibling( $currentContentSubgraph, - $parentIdentifier, - $precedingSiblingCandidates[$i]->nodeAggregateIdentifier + $parentId, + $precedingSiblingCandidates[$i]->nodeAggregateId ); if ($precedingSibling) { $alternateSucceedingSiblings = $currentContentSubgraph->findSucceedingSiblings( - $precedingSiblingIdentifier, + $precedingSiblingId, null, 1 ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php index 7c14b8d16fb..df38e34b2be 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php @@ -5,86 +5,27 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\NodeReferencesToWrite; use Neos\ContentRepository\Core\SharedModel\Node\ReferenceName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Create a named reference from source to destination node * * @api commands are the write-API of the ContentRepository */ -final class SetNodeReferences implements - CommandInterface, - \JsonSerializable, - RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface +final class SetNodeReferences implements CommandInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $sourceNodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $sourceNodeAggregateId, public readonly OriginDimensionSpacePoint $sourceOriginDimensionSpacePoint, public readonly ReferenceName $referenceName, public readonly NodeReferencesToWrite $references, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - - /** - * @param array $array - */ - public static function fromArray(array $array): self - { - return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['sourceNodeAggregateIdentifier']), - OriginDimensionSpacePoint::fromArray($array['sourceOriginDimensionSpacePoint']), - ReferenceName::fromString($array['referenceName']), - NodeReferencesToWrite::fromArray($array['references']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) - ); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'sourceNodeAggregateIdentifier' => $this->sourceNodeAggregateIdentifier, - 'sourceOriginDimensionSpacePoint' => $this->sourceOriginDimensionSpacePoint, - 'referenceName' => $this->referenceName, - 'references' => $this->references, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier - ]; - } - - public function createCopyForContentStream(ContentStreamIdentifier $target): self - { - return new self( - $target, - $this->sourceNodeAggregateIdentifier, - $this->sourceOriginDimensionSpacePoint, - $this->referenceName, - $this->references, - $this->initiatingUserIdentifier - ); - } - - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool - { - return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->sourceOriginDimensionSpacePoint->equals($nodeIdentifierToPublish->dimensionSpacePoint) - && $this->sourceNodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) - ); - } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php index 96497ab0c05..19b7e4a3b06 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php @@ -15,14 +15,14 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\SerializedNodeReferences; use Neos\ContentRepository\Core\SharedModel\Node\ReferenceName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; /** @@ -36,15 +36,15 @@ final class SetSerializedNodeReferences implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $sourceNodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $sourceNodeAggregateId, public readonly OriginDimensionSpacePoint $sourceOriginDimensionSpacePoint, public readonly ReferenceName $referenceName, public readonly SerializedNodeReferences $references, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -54,12 +54,12 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['sourceNodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['sourceNodeAggregateId']), OriginDimensionSpacePoint::fromArray($array['sourceOriginDimensionSpacePoint']), ReferenceName::fromString($array['referenceName']), SerializedNodeReferences::fromArray($array['references']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -70,33 +70,33 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'sourceNodeAggregateIdentifier' => $this->sourceNodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'sourceNodeAggregateId' => $this->sourceNodeAggregateId, 'sourceOriginDimensionSpacePoint' => $this->sourceOriginDimensionSpacePoint, 'referenceName' => $this->referenceName, 'references' => $this->references, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->sourceNodeAggregateIdentifier, + $this->sourceNodeAggregateId, $this->sourceOriginDimensionSpacePoint, $this->referenceName, $this->references, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->sourceOriginDimensionSpacePoint->equals($nodeIdentifierToPublish->dimensionSpacePoint) - && $this->sourceNodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) + $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->sourceOriginDimensionSpacePoint->equals($nodeIdToPublish->dimensionSpacePoint) + && $this->sourceNodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferenceToWrite.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferenceToWrite.php index 8e6effb2729..bfe40ad5cb2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferenceToWrite.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferenceToWrite.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Dto; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * A single node references to write, supports arbitrary objects as reference property values @@ -29,7 +29,7 @@ final class NodeReferenceToWrite implements \JsonSerializable { public function __construct( - public readonly NodeAggregateIdentifier $targetNodeAggregateIdentifier, + public readonly NodeAggregateId $targetNodeAggregateId, public readonly ?PropertyValuesToWrite $properties ) { } @@ -40,7 +40,7 @@ public function __construct( public static function fromArray(array $array): self { return new self( - NodeAggregateIdentifier::fromString($array['targetNodeAggregateIdentifier']), + NodeAggregateId::fromString($array['targetNodeAggregateId']), isset($array['properties']) ? PropertyValuesToWrite::fromArray($array['properties']) : null ); } @@ -51,7 +51,7 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'targetNodeAggregateIdentifier' => $this->targetNodeAggregateIdentifier, + 'targetNodeAggregateId' => $this->targetNodeAggregateId, 'properties' => $this->properties ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferencesToWrite.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferencesToWrite.php index fb654d67ce4..99b329a2479 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferencesToWrite.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/NodeReferencesToWrite.php @@ -15,8 +15,8 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Dto; use JetBrains\PhpStorm\Internal\TentativeType; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; /** * Node references to write, supports arbitrary objects as reference property values. @@ -60,12 +60,12 @@ public static function fromArray(array $values): self )); } - public static function fromNodeAggregateIdentifiers(NodeAggregateIdentifiers $nodeAggregateIdentifiers): self + public static function fromNodeAggregateIds(NodeAggregateIds $nodeAggregateIds): self { return new self(...array_map( - fn (NodeAggregateIdentifier $nodeAggregateIdentifier): NodeReferenceToWrite - => new NodeReferenceToWrite($nodeAggregateIdentifier, null), - $nodeAggregateIdentifiers->getIterator()->getArrayCopy() + fn (NodeAggregateId $nodeAggregateId): NodeReferenceToWrite + => new NodeReferenceToWrite($nodeAggregateId, null), + $nodeAggregateIds->getIterator()->getArrayCopy() )); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReference.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReference.php index ea7d480556a..8928a428377 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReference.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReference.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Dto; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * "Raw" / Serialized node reference as saved in the event log // in projections. @@ -25,7 +25,7 @@ final class SerializedNodeReference implements \JsonSerializable { public function __construct( - public readonly NodeAggregateIdentifier $targetNodeAggregateIdentifier, + public readonly NodeAggregateId $targetNodeAggregateId, public readonly ?SerializedPropertyValues $properties ) { } @@ -36,7 +36,7 @@ public function __construct( public static function fromArray(array $array): self { return new self( - NodeAggregateIdentifier::fromString($array['targetNodeAggregateIdentifier']), + NodeAggregateId::fromString($array['targetNodeAggregateId']), $array['properties'] ? SerializedPropertyValues::fromArray($array['properties']) : null ); } @@ -47,7 +47,7 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'targetNodeAggregateIdentifier' => $this->targetNodeAggregateIdentifier, + 'targetNodeAggregateId' => $this->targetNodeAggregateId, 'properties' => $this->properties ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReferences.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReferences.php index d967b3938e3..dad3345ef40 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReferences.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Dto/SerializedNodeReferences.php @@ -14,8 +14,8 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Dto; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; /** * A collection of SerializedNodeReference objects, to be used when creating reference relations. @@ -55,12 +55,12 @@ public static function fromArray(array $referenceData): self )); } - public static function fromNodeAggregateIdentifiers(NodeAggregateIdentifiers $nodeAggregateIdentifiers): self + public static function fromNodeAggregateIds(NodeAggregateIds $nodeAggregateIds): self { return new self(...array_map( - static fn (NodeAggregateIdentifier $nodeAggregateIdentifier): SerializedNodeReference - => new SerializedNodeReference($nodeAggregateIdentifier, null), - $nodeAggregateIdentifiers->getIterator()->getArrayCopy() + static fn (NodeAggregateId $nodeAggregateId): SerializedNodeReference + => new SerializedNodeReference($nodeAggregateId, null), + $nodeAggregateIds->getIterator()->getArrayCopy() )); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Event/NodeReferencesWereSet.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Event/NodeReferencesWereSet.php index 20c9cac27b8..3e8be844408 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Event/NodeReferencesWereSet.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Event/NodeReferencesWereSet.php @@ -7,11 +7,11 @@ use Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\SerializedNodeReferences; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; use Neos\ContentRepository\Core\SharedModel\Node\ReferenceName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -24,11 +24,11 @@ final class NodeReferencesWereSet implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $sourceNodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $sourceNodeAggregateId, /** * While only one origin dimension space point is selected when initializing the command, * a whole set of origin dimension space points might be affected depending on the @@ -38,59 +38,59 @@ public function __construct( public readonly OriginDimensionSpacePointSet $affectedSourceOriginDimensionSpacePoints, public readonly ReferenceName $referenceName, public readonly SerializedNodeReferences $references, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->sourceNodeAggregateIdentifier, + $targetContentStreamId, + $this->sourceNodeAggregateId, $this->affectedSourceOriginDimensionSpacePoints, $this->referenceName, $this->references, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } /** - * this method is implemented for fulfilling the {@see EmbedsContentStreamAndNodeAggregateIdentifier} interface, + * this method is implemented for fulfilling the {@see EmbedsContentStreamAndNodeAggregateId} interface, * needed for proper content cache flushing in Neos. * - * @return NodeAggregateIdentifier + * @return NodeAggregateId */ - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->sourceNodeAggregateIdentifier; + return $this->sourceNodeAggregateId; } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['sourceNodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['sourceNodeAggregateId']), OriginDimensionSpacePointSet::fromArray($values['affectedSourceOriginDimensionSpacePoints']), ReferenceName::fromString($values['referenceName']), SerializedNodeReferences::fromArray($values['references']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + UserId::fromString($values['initiatingUserId']) ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'sourceNodeAggregateIdentifier' => $this->sourceNodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'sourceNodeAggregateId' => $this->sourceNodeAggregateId, 'affectedSourceOriginDimensionSpacePoints' => $this->affectedSourceOriginDimensionSpacePoints, 'referenceName' => $this->referenceName, 'references' => $this->references, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/NodeReferencing.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/NodeReferencing.php index 5f3aa0d2978..da4b661f346 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/NodeReferencing.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/NodeReferencing.php @@ -28,8 +28,8 @@ use Neos\ContentRepository\Core\Feature\NodeReferencing\Command\SetSerializedNodeReferences; use Neos\ContentRepository\Core\Feature\NodeReferencing\Event\NodeReferencesWereSet; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\EventStore\Model\EventStream\ExpectedVersion; /** @@ -40,8 +40,8 @@ trait NodeReferencing use ConstraintChecks; abstract protected function requireProjectedNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository ): NodeAggregate; @@ -50,11 +50,11 @@ private function handleSetNodeReferences( SetNodeReferences $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist($command->sourceOriginDimensionSpacePoint->toDimensionSpacePoint()); $sourceNodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->sourceNodeAggregateIdentifier, + $command->contentStreamId, + $command->sourceNodeAggregateId, $contentRepository ); $this->requireNodeAggregateToNotBeRoot($sourceNodeAggregate); @@ -71,13 +71,13 @@ private function handleSetNodeReferences( } $lowLevelCommand = new SetSerializedNodeReferences( - $command->contentStreamIdentifier, - $command->sourceNodeAggregateIdentifier, + $command->contentStreamId, + $command->sourceNodeAggregateId, $command->sourceOriginDimensionSpacePoint, $command->referenceName, Dto\SerializedNodeReferences::fromReferences(array_map( fn (NodeReferenceToWrite $reference): SerializedNodeReference => new SerializedNodeReference( - $reference->targetNodeAggregateIdentifier, + $reference->targetNodeAggregateId, $reference->properties ? $this->getPropertyConverter()->serializeReferencePropertyValues( $reference->properties, @@ -88,7 +88,7 @@ private function handleSetNodeReferences( ), $command->references->references )), - $command->initiatingUserIdentifier + $command->initiatingUserId ); return $this->handleSetSerializedNodeReferences($lowLevelCommand, $contentRepository); @@ -103,13 +103,13 @@ private function handleSetSerializedNodeReferences( SetSerializedNodeReferences $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireDimensionSpacePointToExist( $command->sourceOriginDimensionSpacePoint->toDimensionSpacePoint() ); $sourceNodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->sourceNodeAggregateIdentifier, + $command->contentStreamId, + $command->sourceNodeAggregateId, $contentRepository ); $this->requireNodeAggregateToNotBeRoot($sourceNodeAggregate); @@ -120,9 +120,10 @@ private function handleSetSerializedNodeReferences( $this->requireNodeTypeToDeclareReference($sourceNodeAggregate->nodeTypeName, $command->referenceName); foreach ($command->references as $reference) { + assert($reference instanceof SerializedNodeReference); $destinationNodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $reference->targetNodeAggregateIdentifier, + $command->contentStreamId, + $reference->targetNodeAggregateId, $contentRepository ); $this->requireNodeAggregateToNotBeRoot($destinationNodeAggregate); @@ -149,17 +150,17 @@ private function handleSetSerializedNodeReferences( $events = Events::with( new NodeReferencesWereSet( - $command->contentStreamIdentifier, - $command->sourceNodeAggregateIdentifier, + $command->contentStreamId, + $command->sourceNodeAggregateId, $affectedOrigins, $command->referenceName, $command->references, - $command->initiatingUserIdentifier + $command->initiatingUserId ) ); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php index db49fb5ad34..72b2114f308 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php @@ -16,13 +16,13 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * @api commands are the write-API of the ContentRepository @@ -31,20 +31,20 @@ final class RemoveNodeAggregate implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, /** One of the dimension space points covered by the node aggregate in which the user intends to remove it */ public readonly DimensionSpacePoint $coveredDimensionSpacePoint, public readonly NodeVariantSelectionStrategy $nodeVariantSelectionStrategy, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly UserId $initiatingUserId, /** - * This is usually the NodeAggregateIdentifier of the parent node of the deleted node. It is needed for instance + * This is usually the NodeAggregateId of the parent node of the deleted node. It is needed for instance * in the Neos UI for the following scenario: * - when removing a node, you still need to be able to publish the removal. - * - For this to work, the Neos UI needs to know the identifier of the removed Node, **on the page + * - For this to work, the Neos UI needs to know the id of the removed Node, **on the page * where the removal happened** (so that the user can decide to publish a single page INCLUDING the removal * on the page) * - Because this command will *remove* the edge, @@ -53,7 +53,7 @@ public function __construct( * That's why we need this field: For the Neos UI, it stores the document node of the removed node * (see Remove.php), as that is what the UI needs lateron for the change display. */ - public readonly ?NodeAggregateIdentifier $removalAttachmentPoint = null + public readonly ?NodeAggregateId $removalAttachmentPoint = null ) { } @@ -63,13 +63,13 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), DimensionSpacePoint::fromArray($array['coveredDimensionSpacePoint']), NodeVariantSelectionStrategy::from($array['nodeVariantSelectionStrategy']), - UserIdentifier::fromString($array['initiatingUserIdentifier']), + UserId::fromString($array['initiatingUserId']), isset($array['removalAttachmentPoint']) - ? NodeAggregateIdentifier::fromString($array['removalAttachmentPoint']) + ? NodeAggregateId::fromString($array['removalAttachmentPoint']) : null ); } @@ -80,33 +80,33 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'coveredDimensionSpacePoint' => $this->coveredDimensionSpacePoint, 'nodeVariantSelectionStrategy' => $this->nodeVariantSelectionStrategy, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'initiatingUserId' => $this->initiatingUserId, 'removalAttachmentPoint' => $this->removalAttachmentPoint ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->coveredDimensionSpacePoint, $this->nodeVariantSelectionStrategy, - $this->initiatingUserIdentifier, + $this->initiatingUserId, $this->removalAttachmentPoint ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) - && $this->coveredDimensionSpacePoint === $nodeIdentifierToPublish->dimensionSpacePoint + $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) + && $this->coveredDimensionSpacePoint === $nodeIdToPublish->dimensionSpacePoint ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Event/NodeAggregateWasRemoved.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Event/NodeAggregateWasRemoved.php index 1488de8b1b5..08be9c60f13 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Event/NodeAggregateWasRemoved.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Event/NodeAggregateWasRemoved.php @@ -15,13 +15,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeRemoval\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeRemoval\Command\RemoveNodeAggregate; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -30,37 +30,37 @@ final class NodeAggregateWasRemoved implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePointSet $affectedOccupiedDimensionSpacePoints, public readonly DimensionSpacePointSet $affectedCoveredDimensionSpacePoints, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly UserId $initiatingUserId, /** {@see RemoveNodeAggregate::$removalAttachmentPoint} for detailed docs what this is used for. */ - public readonly ?NodeAggregateIdentifier $removalAttachmentPoint = null + public readonly ?NodeAggregateId $removalAttachmentPoint = null ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new NodeAggregateWasRemoved( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->affectedOccupiedDimensionSpacePoints, $this->affectedCoveredDimensionSpacePoints, - $this->initiatingUserIdentifier, + $this->initiatingUserId, $this->removalAttachmentPoint ); } @@ -68,13 +68,13 @@ public function createCopyForContentStream(ContentStreamIdentifier $targetConten public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), OriginDimensionSpacePointSet::fromArray($values['affectedOccupiedDimensionSpacePoints']), DimensionSpacePointSet::fromArray($values['affectedCoveredDimensionSpacePoints']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + UserId::fromString($values['initiatingUserId']), isset($values['removalAttachmentPoint']) - ? NodeAggregateIdentifier::fromString($values['removalAttachmentPoint']) + ? NodeAggregateId::fromString($values['removalAttachmentPoint']) : null, ); } @@ -82,11 +82,11 @@ public static function fromArray(array $values): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'affectedOccupiedDimensionSpacePoints' => $this->affectedOccupiedDimensionSpacePoints, 'affectedCoveredDimensionSpacePoints' => $this->affectedCoveredDimensionSpacePoints, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'initiatingUserId' => $this->initiatingUserId, 'removalAttachmentPoint' => $this->removalAttachmentPoint ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/NodeRemoval.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/NodeRemoval.php index b182e28c2f6..8f218dd31aa 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/NodeRemoval.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/NodeRemoval.php @@ -27,7 +27,7 @@ use Neos\ContentRepository\Core\Feature\NodeRemoval\Command\RemoveNodeAggregate; use Neos\ContentRepository\Core\Feature\NodeRemoval\Event\NodeAggregateWasRemoved; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\EventStore\Model\EventStream\ExpectedVersion; /** @@ -50,10 +50,10 @@ private function handleRemoveNodeAggregate( RemoveNodeAggregate $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $this->requireDimensionSpacePointToExist($command->coveredDimensionSpacePoint); @@ -62,9 +62,9 @@ private function handleRemoveNodeAggregate( $nodeAggregate, $command->coveredDimensionSpacePoint ); - if ($command->removalAttachmentPoint instanceof NodeAggregateIdentifier) { + if ($command->removalAttachmentPoint instanceof NodeAggregateId) { $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, + $command->contentStreamId, $command->removalAttachmentPoint, $contentRepository ); @@ -72,8 +72,8 @@ private function handleRemoveNodeAggregate( $events = Events::with( new NodeAggregateWasRemoved( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $command->nodeVariantSelectionStrategy->resolveAffectedOriginDimensionSpacePoints( $nodeAggregate->getOccupationByCovered($command->coveredDimensionSpacePoint), $nodeAggregate, @@ -84,13 +84,13 @@ private function handleRemoveNodeAggregate( $nodeAggregate, $this->getInterDimensionalVariationGraph() ), - $command->initiatingUserIdentifier, + $command->initiatingUserId, $command->removalAttachmentPoint ) ); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier($command->contentStreamIdentifier) + ContentStreamEventStreamName::fromContentStreamId($command->contentStreamId) ->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, @@ -104,7 +104,7 @@ protected function requireNodeAggregateNotToBeTethered(NodeAggregate $nodeAggreg { if ($nodeAggregate->classification->isTethered()) { throw new TetheredNodeAggregateCannotBeRemoved( - 'The node aggregate "' . $nodeAggregate->nodeAggregateIdentifier + 'The node aggregate "' . $nodeAggregate->nodeAggregateId . '" is tethered, and thus cannot be removed.', 1597753832 ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php index 6b7088317f1..bfd41a27ace 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php @@ -15,13 +15,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeRenaming\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * All variants in a NodeAggregate have the same NodeName - and this can be changed here. @@ -34,13 +34,13 @@ final class ChangeNodeAggregateName implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeName $newNodeName, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -50,10 +50,10 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), NodeName::fromString($array['newNodeName']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -63,28 +63,28 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'newNodeName' => $this->newNodeName, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new ChangeNodeAggregateName( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->newNodeName, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { return ( - $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) + $this->contentStreamId->equals($nodeIdToPublish->contentStreamId) + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Event/NodeAggregateNameWasChanged.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Event/NodeAggregateNameWasChanged.php index 214f56665e2..ee59359658a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Event/NodeAggregateNameWasChanged.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Event/NodeAggregateNameWasChanged.php @@ -14,12 +14,12 @@ namespace Neos\ContentRepository\Core\Feature\NodeRenaming\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -28,53 +28,53 @@ final class NodeAggregateNameWasChanged implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeName $newNodeName, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->newNodeName, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), NodeName::fromString($values['newNodeName']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + UserId::fromString($values['initiatingUserId']) ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'newNodeName' => $this->newNodeName, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php index baefa3666a0..3e80ad7cba7 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php @@ -35,16 +35,16 @@ private function handleChangeNodeAggregateName(ChangeNodeAggregateName $command) // TODO: check if aggregate is root $events = Events::with( new NodeAggregateNameWasChanged( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $command->newNodeName, - $command->initiatingUserIdentifier + $command->initiatingUserId ), ); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier( - $command->contentStreamIdentifier + ContentStreamEventStreamName::fromContentStreamId( + $command->contentStreamId )->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php index cd02620852c..ea9b9c74bfa 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php @@ -18,14 +18,14 @@ use Neos\ContentRepository\Core\Feature\NodeTypeChange\Dto\NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy; /** @codingStandardsIgnoreEnd */ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdentifiersByNodePaths; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; /** * @api commands are the write-API of the ContentRepository @@ -34,23 +34,23 @@ final class ChangeNodeAggregateType implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $newNodeTypeName, public readonly NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy $strategy, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly UserId $initiatingUserId, /** - * NodeAggregateIdentifiers for tethered descendants (optional). + * NodeAggregateIds for tethered descendants (optional). * - * If the given node type declares tethered child nodes, you may predefine their node aggregate identifiers + * If the given node type declares tethered child nodes, you may predefine their node aggregate ids * using this assignment registry. * Since tethered child nodes may have tethered child nodes themselves, * this registry is indexed using relative node paths to the node to create in the first place. */ - public readonly ?NodeAggregateIdentifiersByNodePaths $tetheredDescendantNodeAggregateIdentifiers = null + public readonly ?NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds = null ) { } @@ -60,37 +60,37 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['newNodeTypeName']), NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy::from($array['strategy']), - UserIdentifier::fromString($array['initiatingUserIdentifier']), - isset($array['tetheredDescendantNodeAggregateIdentifiers']) - ? NodeAggregateIdentifiersByNodePaths::fromArray($array['tetheredDescendantNodeAggregateIdentifiers']) + UserId::fromString($array['initiatingUserId']), + isset($array['tetheredDescendantNodeAggregateIds']) + ? NodeAggregateIdsByNodePaths::fromArray($array['tetheredDescendantNodeAggregateIds']) : null ); } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { - return $this->contentStreamIdentifier === $nodeIdentifierToPublish->contentStreamIdentifier - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier); + return $this->contentStreamId === $nodeIdToPublish->contentStreamId + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId); } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->newNodeTypeName, $this->strategy, - $this->initiatingUserIdentifier, - $this->tetheredDescendantNodeAggregateIdentifiers + $this->initiatingUserId, + $this->tetheredDescendantNodeAggregateIds ); } @@ -100,31 +100,31 @@ public function createCopyForContentStream(ContentStreamIdentifier $target): sel public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'newNodeTypeName' => $this->newNodeTypeName, 'strategy' => $this->strategy, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, - 'tetheredDescendantNodeAggregateIdentifiers' => $this->tetheredDescendantNodeAggregateIdentifiers + 'initiatingUserId' => $this->initiatingUserId, + 'tetheredDescendantNodeAggregateIds' => $this->tetheredDescendantNodeAggregateIds ]; } /** * Create a new ChangeNodeAggregateType command with all original values, - * except the tetheredDescendantNodeAggregateIdentifiers (where the passed in arguments are used). + * except the tetheredDescendantNodeAggregateIds (where the passed in arguments are used). * * Is needed to make this command fully deterministic before storing it at the events. */ - public function withTetheredDescendantNodeAggregateIdentifiers( - NodeAggregateIdentifiersByNodePaths $tetheredDescendantNodeAggregateIdentifiers + public function withTetheredDescendantNodeAggregateIds( + NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds ): self { return new self( - $this->contentStreamIdentifier, - $this->nodeAggregateIdentifier, + $this->contentStreamId, + $this->nodeAggregateId, $this->newNodeTypeName, $this->strategy, - $this->initiatingUserIdentifier, - $tetheredDescendantNodeAggregateIdentifiers + $this->initiatingUserId, + $tetheredDescendantNodeAggregateIds ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Event/NodeAggregateTypeWasChanged.php b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Event/NodeAggregateTypeWasChanged.php index 0059ce6f4a3..e7d5a666570 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Event/NodeAggregateTypeWasChanged.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Event/NodeAggregateTypeWasChanged.php @@ -14,10 +14,10 @@ namespace Neos\ContentRepository\Core\Feature\NodeTypeChange\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -27,30 +27,30 @@ final class NodeAggregateTypeWasChanged implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $newNodeTypeName ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->newNodeTypeName ); } @@ -58,8 +58,8 @@ public function createCopyForContentStream(ContentStreamIdentifier $targetConten public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), NodeTypeName::fromString($values['newNodeTypeName']), ); } @@ -67,8 +67,8 @@ public static function fromArray(array $values): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'newNodeTypeName' => $this->newNodeTypeName ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php index a7b918ea4a7..cb959727fe8 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php @@ -19,10 +19,10 @@ use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\NodeType\NodeType; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; @@ -35,9 +35,9 @@ use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregatesTypeIsAmbiguous; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\Feature\Common\NodeAggregateEventPublisher; -use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdentifiersByNodePaths; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\EventStream\ExpectedVersion; /** @codingStandardsIgnoreStart */ @@ -50,16 +50,16 @@ trait NodeTypeChange { abstract protected function requireProjectedNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository ): NodeAggregate; abstract protected function requireConstraintsImposedByAncestorsAreMet( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeType $nodeType, ?NodeName $nodeName, - array $parentNodeAggregateIdentifiers, + array $parentNodeAggregateIds, ContentRepository $contentRepository ): void; @@ -87,19 +87,19 @@ abstract protected function areNodeTypeConstraintsImposedByGrandparentValid( NodeType $nodeType ): bool; - abstract protected static function populateNodeAggregateIdentifiers( + abstract protected static function populateNodeAggregateIds( NodeType $nodeType, - NodeAggregateIdentifiersByNodePaths $nodeAggregateIdentifiers, + NodeAggregateIdsByNodePaths $nodeAggregateIds, NodePath $childPath = null - ): NodeAggregateIdentifiersByNodePaths; + ): NodeAggregateIdsByNodePaths; abstract protected function createEventsForMissingTetheredNode( NodeAggregate $parentNodeAggregate, Node $parentNode, NodeName $tetheredNodeName, - NodeAggregateIdentifier $tetheredNodeAggregateIdentifier, + NodeAggregateId $tetheredNodeAggregateId, NodeType $expectedTetheredNodeType, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events; @@ -117,11 +117,11 @@ private function handleChangeNodeAggregateType( * Constraint checks **************/ // existence of content stream, node type and node aggregate - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $newNodeType = $this->requireNodeType($command->newNodeTypeName); $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); @@ -132,15 +132,16 @@ private function handleChangeNodeAggregateType( // the new node type must be allowed at this position in the tree $parentNodeAggregates = $contentRepository->getContentGraph()->findParentNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ); foreach ($parentNodeAggregates as $parentNodeAggregate) { + assert($parentNodeAggregate instanceof NodeAggregate); $this->requireConstraintsImposedByAncestorsAreMet( - $command->contentStreamIdentifier, + $command->contentStreamId, $newNodeType, $nodeAggregate->nodeName, - [$parentNodeAggregate->nodeAggregateIdentifier], + [$parentNodeAggregate->nodeAggregateId], $contentRepository ); } @@ -156,21 +157,21 @@ private function handleChangeNodeAggregateType( /************** * Preparation - make the command fully deterministic in case of rebase **************/ - $descendantNodeAggregateIdentifiers = static::populateNodeAggregateIdentifiers( + $descendantNodeAggregateIds = static::populateNodeAggregateIds( $newNodeType, - $command->tetheredDescendantNodeAggregateIdentifiers + $command->tetheredDescendantNodeAggregateIds ); - // Write the auto-created descendant node aggregate identifiers back to the command; + // Write the auto-created descendant node aggregate ids back to the command; // so that when rebasing the command, it stays fully deterministic. - $command = $command->withTetheredDescendantNodeAggregateIdentifiers($descendantNodeAggregateIdentifiers); + $command = $command->withTetheredDescendantNodeAggregateIds($descendantNodeAggregateIds); /************** * Creating the events **************/ $events = [ new NodeAggregateTypeWasChanged( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $command->newNodeTypeName ), ]; @@ -180,13 +181,13 @@ private function handleChangeNodeAggregateType( array_push($events, ...iterator_to_array($this->deleteDisallowedNodesWhenChangingNodeType( $nodeAggregate, $newNodeType, - $command->initiatingUserIdentifier, + $command->initiatingUserId, $contentRepository ))); array_push($events, ...iterator_to_array($this->deleteObsoleteTetheredNodesWhenChangingNodeType( $nodeAggregate, $newNodeType, - $command->initiatingUserIdentifier, + $command->initiatingUserId, $contentRepository ))); } @@ -199,25 +200,25 @@ private function handleChangeNodeAggregateType( $tetheredNodeName = NodeName::fromString($serializedTetheredNodeName); $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $node->originDimensionSpacePoint->toDimensionSpacePoint(), VisibilityConstraints::withoutRestrictions() ); $tetheredNode = $subgraph->findChildNodeConnectedThroughEdgeName( - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $tetheredNodeName ); if ($tetheredNode === null) { - $tetheredNodeAggregateIdentifier = $command->tetheredDescendantNodeAggregateIdentifiers - ?->getNodeAggregateIdentifier(NodePath::fromString((string)$tetheredNodeName)) - ?: NodeAggregateIdentifier::create(); + $tetheredNodeAggregateId = $command->tetheredDescendantNodeAggregateIds + ?->getNodeAggregateId(NodePath::fromString((string)$tetheredNodeName)) + ?: NodeAggregateId::create(); array_push($events, ...iterator_to_array($this->createEventsForMissingTetheredNode( $nodeAggregate, $node, $tetheredNodeName, - $tetheredNodeAggregateIdentifier, + $tetheredNodeAggregateId, $expectedTetheredNodeType, - $command->initiatingUserIdentifier, + $command->initiatingUserId, $contentRepository ))); } @@ -225,8 +226,8 @@ private function handleChangeNodeAggregateType( } return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier( - $command->contentStreamIdentifier + ContentStreamEventStreamName::fromContentStreamId( + $command->contentStreamId )->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, @@ -250,8 +251,8 @@ private function requireConstraintsImposedByHappyPathStrategyAreMet( // if we have children, we need to check whether they are still allowed // after we changed the node type of the $nodeAggregate to $newNodeType. $childNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ); foreach ($childNodeAggregates as $childNodeAggregate) { /* @var $childNodeAggregate NodeAggregate */ @@ -269,8 +270,8 @@ private function requireConstraintsImposedByHappyPathStrategyAreMet( // additionally, we need to look one level down to the grandchildren as well // - as it could happen that these are affected by our constraint checks as well. $grandchildNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregates( - $childNodeAggregate->contentStreamIdentifier, - $childNodeAggregate->nodeAggregateIdentifier + $childNodeAggregate->contentStreamId, + $childNodeAggregate->nodeAggregateId ); foreach ($grandchildNodeAggregates as $grandchildNodeAggregate) { /* @var $grandchildNodeAggregate NodeAggregate */ @@ -293,15 +294,15 @@ private function requireConstraintsImposedByHappyPathStrategyAreMet( private function deleteDisallowedNodesWhenChangingNodeType( NodeAggregate $nodeAggregate, NodeType $newNodeType, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events { $events = []; // if we have children, we need to check whether they are still allowed // after we changed the node type of the $nodeAggregate to $newNodeType. $childNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ); foreach ($childNodeAggregates as $childNodeAggregate) { /* @var $childNodeAggregate NodeAggregate */ @@ -326,7 +327,7 @@ private function deleteDisallowedNodesWhenChangingNodeType( $events[] = $this->removeNodeInDimensionSpacePointSet( $childNodeAggregate, $dimensionSpacePointsToBeRemoved, - $initiatingUserIdentifier + $initiatingUserId ); } @@ -336,8 +337,8 @@ private function deleteDisallowedNodesWhenChangingNodeType( // additionally, we need to look one level down to the grandchildren as well // - as it could happen that these are affected by our constraint checks as well. $grandchildNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregates( - $childNodeAggregate->contentStreamIdentifier, - $childNodeAggregate->nodeAggregateIdentifier + $childNodeAggregate->contentStreamId, + $childNodeAggregate->nodeAggregateId ); foreach ($grandchildNodeAggregates as $grandchildNodeAggregate) { /* @var $grandchildNodeAggregate NodeAggregate */ @@ -363,7 +364,7 @@ private function deleteDisallowedNodesWhenChangingNodeType( $events[] = $this->removeNodeInDimensionSpacePointSet( $grandchildNodeAggregate, $dimensionSpacePointsToBeRemoved, - $initiatingUserIdentifier + $initiatingUserId ); } } @@ -375,7 +376,7 @@ private function deleteDisallowedNodesWhenChangingNodeType( private function deleteObsoleteTetheredNodesWhenChangingNodeType( NodeAggregate $nodeAggregate, NodeType $newNodeType, - UserIdentifier $initiatingUserIdentifier, + UserId $initiatingUserId, ContentRepository $contentRepository ): Events { $expectedTetheredNodes = $newNodeType->getAutoCreatedChildNodes(); @@ -383,8 +384,8 @@ private function deleteObsoleteTetheredNodesWhenChangingNodeType( $events = []; // find disallowed tethered nodes $tetheredNodeAggregates = $contentRepository->getContentGraph()->findTetheredChildNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ); foreach ($tetheredNodeAggregates as $tetheredNodeAggregate) { @@ -401,7 +402,7 @@ private function deleteObsoleteTetheredNodesWhenChangingNodeType( $events[] = $this->removeNodeInDimensionSpacePointSet( $tetheredNodeAggregate, $dimensionSpacePointsToBeRemoved, - $initiatingUserIdentifier + $initiatingUserId ); } } @@ -440,14 +441,14 @@ private function findDimensionSpacePointsConnectingParentAndChildAggregate( $points = []; foreach ($childNodeAggregate->coveredDimensionSpacePoints as $coveredDimensionSpacePoint) { $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $childNodeAggregate->contentStreamIdentifier, + $childNodeAggregate->contentStreamId, $coveredDimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); - $parentNode = $subgraph->findParentNode($childNodeAggregate->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($childNodeAggregate->nodeAggregateId); if ( $parentNode - && $parentNode->nodeAggregateIdentifier->equals($parentNodeAggregate->nodeAggregateIdentifier) + && $parentNode->nodeAggregateId->equals($parentNodeAggregate->nodeAggregateId) ) { $points[] = $coveredDimensionSpacePoint; } @@ -459,11 +460,11 @@ private function findDimensionSpacePointsConnectingParentAndChildAggregate( private function removeNodeInDimensionSpacePointSet( NodeAggregate $nodeAggregate, DimensionSpacePointSet $coveredDimensionSpacePointsToBeRemoved, - UserIdentifier $initiatingUserIdentifier + UserId $initiatingUserId ): NodeAggregateWasRemoved { return new NodeAggregateWasRemoved( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier, + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId, // TODO: we also use the covered dimension space points as OCCUPIED dimension space points // - however the OCCUPIED dimension space points are not really used by now // (except for the change projector, which needs love anyways...) @@ -471,7 +472,7 @@ private function removeNodeInDimensionSpacePointSet( $coveredDimensionSpacePointsToBeRemoved ), $coveredDimensionSpacePointsToBeRemoved, - $initiatingUserIdentifier + $initiatingUserId ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php index bf68b253c0a..5990a9c7bf4 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php @@ -15,13 +15,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeVariation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Create a variant of a node in a content stream @@ -34,14 +34,14 @@ final class CreateNodeVariant implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface, - MatchableWithNodeIdentifierToPublishOrDiscardInterface + MatchableWithNodeIdToPublishOrDiscardInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $sourceOrigin, public readonly OriginDimensionSpacePoint $targetOrigin, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -51,11 +51,11 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($array['sourceOrigin']), OriginDimensionSpacePoint::fromArray($array['targetOrigin']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -65,29 +65,29 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'sourceOrigin' => $this->sourceOrigin, 'targetOrigin' => $this->targetOrigin, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } - public function matchesNodeIdentifier(NodeIdentifierToPublishOrDiscard $nodeIdentifierToPublish): bool + public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool { - return $this->contentStreamIdentifier->equals($nodeIdentifierToPublish->contentStreamIdentifier) - && $this->nodeAggregateIdentifier->equals($nodeIdentifierToPublish->nodeAggregateIdentifier) - && $this->targetOrigin->equals($nodeIdentifierToPublish->dimensionSpacePoint); + return $this->contentStreamId->equals($nodeIdToPublish->contentStreamId) + && $this->nodeAggregateId->equals($nodeIdToPublish->nodeAggregateId) + && $this->targetOrigin->equals($nodeIdToPublish->dimensionSpacePoint); } - public function createCopyForContentStream(ContentStreamIdentifier $target): CommandInterface + public function createCopyForContentStream(ContentStreamId $target): CommandInterface { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->sourceOrigin, $this->targetOrigin, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeGeneralizationVariantWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeGeneralizationVariantWasCreated.php index 1e1a2074fb1..7cacd4d1700 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeGeneralizationVariantWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeGeneralizationVariantWasCreated.php @@ -15,12 +15,12 @@ namespace Neos\ContentRepository\Core\Feature\NodeVariation\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -31,62 +31,62 @@ final class NodeGeneralizationVariantWasCreated implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $sourceOrigin, public readonly OriginDimensionSpacePoint $generalizationOrigin, public readonly DimensionSpacePointSet $generalizationCoverage, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } public function createCopyForContentStream( - ContentStreamIdentifier $targetContentStreamIdentifier + ContentStreamId $targetContentStreamId ): self { return new NodeGeneralizationVariantWasCreated( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->sourceOrigin, $this->generalizationOrigin, $this->generalizationCoverage, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($values['sourceOrigin']), OriginDimensionSpacePoint::fromArray($values['generalizationOrigin']), DimensionSpacePointSet::fromArray($values['generalizationCoverage']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + UserId::fromString($values['initiatingUserId']), ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'sourceOrigin' => $this->sourceOrigin, 'generalizationOrigin' => $this->generalizationOrigin, 'generalizationCoverage' => $this->generalizationCoverage, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodePeerVariantWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodePeerVariantWasCreated.php index dc53e4d88ff..5392a943ea9 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodePeerVariantWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodePeerVariantWasCreated.php @@ -14,13 +14,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeVariation\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -29,61 +29,61 @@ final class NodePeerVariantWasCreated implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $sourceOrigin, public readonly OriginDimensionSpacePoint $peerOrigin, public readonly DimensionSpacePointSet $peerCoverage, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->sourceOrigin, $this->peerOrigin, $this->peerCoverage, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($values['sourceOrigin']), OriginDimensionSpacePoint::fromArray($values['peerOrigin']), DimensionSpacePointSet::fromArray($values['peerCoverage']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + UserId::fromString($values['initiatingUserId']), ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'sourceOrigin' => $this->sourceOrigin, 'peerOrigin' => $this->peerOrigin, 'peerCoverage' => $this->peerCoverage, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeSpecializationVariantWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeSpecializationVariantWasCreated.php index e07601c4256..f3e31f1a730 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeSpecializationVariantWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Event/NodeSpecializationVariantWasCreated.php @@ -15,12 +15,12 @@ namespace Neos\ContentRepository\Core\Feature\NodeVariation\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -31,60 +31,60 @@ final class NodeSpecializationVariantWasCreated implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $sourceOrigin, public readonly OriginDimensionSpacePoint $specializationOrigin, public readonly DimensionSpacePointSet $specializationCoverage, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->sourceOrigin, $this->specializationOrigin, $this->specializationCoverage, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($values['sourceOrigin']), OriginDimensionSpacePoint::fromArray($values['specializationOrigin']), DimensionSpacePointSet::fromArray($values['specializationCoverage']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + UserId::fromString($values['initiatingUserId']), ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'sourceOrigin' => $this->sourceOrigin, 'specializationOrigin' => $this->specializationOrigin, 'specializationCoverage' => $this->specializationCoverage, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier + 'initiatingUserId' => $this->initiatingUserId ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/NodeVariation.php b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/NodeVariation.php index f870c30eb2d..ce4f45edbae 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/NodeVariation.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/NodeVariation.php @@ -51,10 +51,10 @@ private function handleCreateNodeVariant( CreateNodeVariant $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $nodeAggregate = $this->requireProjectedNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $this->requireDimensionSpacePointToExist($command->sourceOrigin->toDimensionSpacePoint()); @@ -64,8 +64,8 @@ private function handleCreateNodeVariant( $this->requireNodeAggregateToOccupyDimensionSpacePoint($nodeAggregate, $command->sourceOrigin); $this->requireNodeAggregateToNotOccupyDimensionSpacePoint($nodeAggregate, $command->targetOrigin); $parentNodeAggregate = $this->requireProjectedParentNodeAggregate( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $command->sourceOrigin, $contentRepository ); @@ -75,17 +75,17 @@ private function handleCreateNodeVariant( ); $events = $this->createEventsForVariations( - $command->contentStreamIdentifier, + $command->contentStreamId, $command->sourceOrigin, $command->targetOrigin, $nodeAggregate, - $command->initiatingUserIdentifier, + $command->initiatingUserId, $contentRepository ); return new EventsToPublish( - ContentStreamEventStreamName::fromContentStreamIdentifier( - $command->contentStreamIdentifier + ContentStreamEventStreamName::fromContentStreamId( + $command->contentStreamId )->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php index 6ab8430ac26..11ca2fe6994 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php @@ -15,11 +15,11 @@ namespace Neos\ContentRepository\Core\Feature\RootNodeCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Create root node aggregate with node command @@ -35,10 +35,10 @@ final class CreateRootNodeAggregateWithNode implements RebasableToOtherContentStreamsInterface { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $nodeTypeName, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } @@ -48,10 +48,10 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['nodeTypeName']), - UserIdentifier::fromString($array['initiatingUserIdentifier']) + UserId::fromString($array['initiatingUserId']) ); } @@ -61,20 +61,20 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'nodeTypeName' => $this->nodeTypeName, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'initiatingUserId' => $this->initiatingUserId, ]; } - public function createCopyForContentStream(ContentStreamIdentifier $target): self + public function createCopyForContentStream(ContentStreamId $target): self { return new self( $target, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->nodeTypeName, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Event/RootNodeAggregateWithNodeWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Event/RootNodeAggregateWithNodeWasCreated.php index 24c46a5bb61..48a6ffc664a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Event/RootNodeAggregateWithNodeWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Event/RootNodeAggregateWithNodeWasCreated.php @@ -15,13 +15,13 @@ namespace Neos\ContentRepository\Core\Feature\RootNodeCreation\Event; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\EventStore\EventInterface; /** @@ -32,62 +32,62 @@ final class RootNodeAggregateWithNodeWasCreated implements EventInterface, PublishableToOtherContentStreamsInterface, - EmbedsContentStreamAndNodeAggregateIdentifier + EmbedsContentStreamAndNodeAggregateId { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $nodeTypeName, /** Root nodes by definition cover *all* dimension space points; so we need to include the full list here. */ public readonly DimensionSpacePointSet $coveredDimensionSpacePoints, public readonly NodeAggregateClassification $nodeAggregateClassification, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } - public function createCopyForContentStream(ContentStreamIdentifier $targetContentStreamIdentifier): self + public function createCopyForContentStream(ContentStreamId $targetContentStreamId): self { return new self( - $targetContentStreamIdentifier, - $this->nodeAggregateIdentifier, + $targetContentStreamId, + $this->nodeAggregateId, $this->nodeTypeName, $this->coveredDimensionSpacePoints, $this->nodeAggregateClassification, - $this->initiatingUserIdentifier + $this->initiatingUserId ); } public static function fromArray(array $values): self { return new self( - ContentStreamIdentifier::fromString($values['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($values['nodeAggregateIdentifier']), + ContentStreamId::fromString($values['contentStreamId']), + NodeAggregateId::fromString($values['nodeAggregateId']), NodeTypeName::fromString($values['nodeTypeName']), DimensionSpacePointSet::fromArray($values['coveredDimensionSpacePoints']), NodeAggregateClassification::from($values['nodeAggregateClassification']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + UserId::fromString($values['initiatingUserId']), ); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'nodeTypeName' => $this->nodeTypeName, 'coveredDimensionSpacePoints' => $this->coveredDimensionSpacePoints, 'nodeAggregateClassification' => $this->nodeAggregateClassification, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeCreation.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeCreation.php index 08f52bd51d4..1f6239088ff 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeCreation.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeCreation.php @@ -58,10 +58,10 @@ private function handleCreateRootNodeAggregateWithNode( CreateRootNodeAggregateWithNode $command, ContentRepository $contentRepository ): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamIdentifier, $contentRepository); + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $this->requireProjectedNodeAggregateToNotExist( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $contentRepository ); $nodeType = $this->requireNodeType($command->nodeTypeName); @@ -75,8 +75,8 @@ private function handleCreateRootNodeAggregateWithNode( ) ); - $contentStreamEventStream = ContentStreamEventStreamName::fromContentStreamIdentifier( - $command->contentStreamIdentifier + $contentStreamEventStream = ContentStreamEventStreamName::fromContentStreamId( + $command->contentStreamId ); return new EventsToPublish( $contentStreamEventStream->getEventStreamName(), @@ -93,12 +93,12 @@ private function createRootWithNode( DimensionSpacePointSet $coveredDimensionSpacePoints ): RootNodeAggregateWithNodeWasCreated { return new RootNodeAggregateWithNodeWasCreated( - $command->contentStreamIdentifier, - $command->nodeAggregateIdentifier, + $command->contentStreamId, + $command->nodeAggregateId, $command->nodeTypeName, $coveredDimensionSpacePoints, NodeAggregateClassification::CLASSIFICATION_ROOT, - $command->initiatingUserIdentifier + $command->initiatingUserId ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php index 12fbeeaf8f0..7b6b63edcc6 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php @@ -23,7 +23,7 @@ use Neos\ContentRepository\Core\EventStore\EventPersister; use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\DiscardIndividualNodesFromWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\DiscardWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishIndividualNodesFromWorkspace; @@ -35,7 +35,7 @@ use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamDoesNotExistYet; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\Common\PublishableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdentifierToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateRootWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishWorkspace; @@ -54,7 +54,7 @@ use Neos\ContentRepository\Core\SharedModel\Exception\WorkspaceDoesNotExist; use Neos\ContentRepository\Core\SharedModel\Exception\WorkspaceHasNoBaseWorkspaceName; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\EventStore\EventInterface; use Neos\EventStore\EventStoreInterface; @@ -137,9 +137,9 @@ private function handleCreateWorkspace( // When the workspace is created, we first have to fork the content stream $contentRepository->handle( new ForkContentStream( - $command->newContentStreamIdentifier, - $baseWorkspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $command->newContentStreamId, + $baseWorkspace->currentContentStreamId, + $command->initiatingUserId ) )->block(); @@ -149,8 +149,8 @@ private function handleCreateWorkspace( $command->baseWorkspaceName, $command->workspaceTitle, $command->workspaceDescription, - $command->initiatingUserIdentifier, - $command->newContentStreamIdentifier, + $command->initiatingUserId, + $command->newContentStreamId, $command->workspaceOwner ), ); @@ -180,11 +180,11 @@ public function handleCreateRootWorkspace( ), 1505848624450); } - $contentStreamIdentifier = $command->newContentStreamIdentifier; + $newContentStreamId = $command->newContentStreamId; $contentRepository->handle( new CreateContentStream( - $contentStreamIdentifier, - $command->initiatingUserIdentifier + $newContentStreamId, + $command->initiatingUserId ) )->block(); @@ -193,8 +193,8 @@ public function handleCreateRootWorkspace( $command->workspaceName, $command->workspaceTitle, $command->workspaceDescription, - $command->initiatingUserIdentifier, - $contentStreamIdentifier + $command->initiatingUserId, + $newContentStreamId ) ); @@ -222,17 +222,17 @@ public function handlePublishWorkspace( $baseWorkspace = $this->requireBaseWorkspace($workspace, $contentRepository); $this->publishContentStream( - $workspace->currentContentStreamIdentifier, - $baseWorkspace->currentContentStreamIdentifier + $workspace->currentContentStreamId, + $baseWorkspace->currentContentStreamId )?->block(); // After publishing a workspace, we need to again fork from Base. - $newContentStream = ContentStreamIdentifier::create(); + $newContentStream = ContentStreamId::create(); $contentRepository->handle( new ForkContentStream( $newContentStream, - $baseWorkspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $baseWorkspace->currentContentStreamId, + $command->initiatingUserId ) )->block(); @@ -242,8 +242,8 @@ public function handlePublishWorkspace( $command->workspaceName, $baseWorkspace->workspaceName, $newContentStream, - $workspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $workspace->currentContentStreamId, + $command->initiatingUserId ) ); // if we got so far without an Exception, we can switch the Workspace's active Content stream. @@ -259,12 +259,12 @@ public function handlePublishWorkspace( * @throws \Exception */ private function publishContentStream( - ContentStreamIdentifier $contentStreamIdentifier, - ContentStreamIdentifier $baseContentStreamIdentifier + ContentStreamId $contentStreamId, + ContentStreamId $baseContentStreamId ): ?CommandResult { - $contentStreamName = ContentStreamEventStreamName::fromContentStreamIdentifier($contentStreamIdentifier); - $baseWorkspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $baseContentStreamIdentifier + $contentStreamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamId); + $baseWorkspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamId( + $baseContentStreamId ); // TODO: please check the code below in-depth. it does: @@ -288,7 +288,7 @@ private function publishContentStream( if ($event instanceof ContentStreamWasForked) { if ($contentStreamWasForkedEvent !== null) { throw new \RuntimeException( - 'Invariant violation: The content stream "' . $contentStreamIdentifier + 'Invariant violation: The content stream "' . $contentStreamId . '" has two forked events.', 1658740373 ); @@ -296,7 +296,7 @@ private function publishContentStream( $contentStreamWasForkedEvent = $event; } elseif ($event instanceof PublishableToOtherContentStreamsInterface) { /** @var EventInterface $copiedEvent */ - $copiedEvent = $event->createCopyForContentStream($baseContentStreamIdentifier); + $copiedEvent = $event->createCopyForContentStream($baseContentStreamId); // We need to add the event metadata here for rebasing in nested workspace situations // (and for exporting) $events[] = DecoratedEvent::withMetadata( @@ -307,7 +307,7 @@ private function publishContentStream( } if ($contentStreamWasForkedEvent === null) { - throw new \RuntimeException('Invariant violation: The content stream "' . $contentStreamIdentifier + throw new \RuntimeException('Invariant violation: The content stream "' . $contentStreamId . '" has NO forked event.', 1658740407); } @@ -327,7 +327,7 @@ private function publishContentStream( 'The base workspace has been modified in the meantime; please rebase.' . ' Expected version %d of source content stream %s', $contentStreamWasForkedEvent->versionOfSourceContentStream->value, - $baseContentStreamIdentifier + $baseContentStreamId )); } } @@ -349,17 +349,17 @@ public function handleRebaseWorkspace( // TODO: please check the code below in-depth. it does: // - fork a new content stream // - extract the commands from the to-be-rebased content stream; and applies them on the new content stream - $rebasedContentStream = $command->rebasedContentStreamIdentifier; + $rebasedContentStream = $command->rebasedContentStreamId; $contentRepository->handle( new ForkContentStream( $rebasedContentStream, - $baseWorkspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $baseWorkspace->currentContentStreamId, + $command->initiatingUserId ) )->block(); - $workspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $workspace->currentContentStreamIdentifier + $workspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamId( + $workspace->currentContentStreamId ); $originalCommands = $this->extractCommandsFromContentStreamMetadata($workspaceContentStreamName); @@ -396,7 +396,7 @@ public function handleRebaseWorkspace( $i, get_class($commandToRebase), $baseWorkspace->workspaceName, - $baseWorkspace->currentContentStreamIdentifier, + $baseWorkspace->currentContentStreamId, $fullCommandListSoFar ), $e); } @@ -410,8 +410,8 @@ public function handleRebaseWorkspace( new WorkspaceWasRebased( $command->workspaceName, $rebasedContentStream, - $workspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $workspace->currentContentStreamId, + $command->initiatingUserId ), ); @@ -427,8 +427,8 @@ public function handleRebaseWorkspace( new WorkspaceRebaseFailed( $command->workspaceName, $rebasedContentStream, - $workspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier, + $workspace->currentContentStreamId, + $command->initiatingUserId, $rebaseStatistics->getErrors() ) ); @@ -488,8 +488,8 @@ public function handlePublishIndividualNodesFromWorkspace( $baseWorkspace = $this->requireBaseWorkspace($workspace, $contentRepository); // 1) separate commands in two halves - the ones MATCHING the nodes from the command, and the REST - $workspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $workspace->currentContentStreamIdentifier + $workspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamId( + $workspace->currentContentStreamId ); $originalCommands = $this->extractCommandsFromContentStreamMetadata($workspaceContentStreamName); @@ -499,10 +499,10 @@ public function handlePublishIndividualNodesFromWorkspace( $remainingCommands = []; foreach ($originalCommands as $originalCommand) { - if (!$originalCommand instanceof MatchableWithNodeIdentifierToPublishOrDiscardInterface) { + if (!$originalCommand instanceof MatchableWithNodeIdToPublishOrDiscardInterface) { throw new \Exception( 'Command class ' . get_class($originalCommand) . ' does not implement ' - . MatchableWithNodeIdentifierToPublishOrDiscardInterface::class, + . MatchableWithNodeIdToPublishOrDiscardInterface::class, 1645393655 ); } @@ -514,12 +514,12 @@ public function handlePublishIndividualNodesFromWorkspace( } // 2) fork a new contentStream, based on the base WS, and apply MATCHING - $matchingContentStream = $command->contentStreamIdentifierForMatchingPart; + $matchingContentStream = $command->contentStreamIdForMatchingPart; $contentRepository->handle( new ForkContentStream( $matchingContentStream, - $baseWorkspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $baseWorkspace->currentContentStreamId, + $command->initiatingUserId ) )->block(); @@ -535,12 +535,12 @@ public function handlePublishIndividualNodesFromWorkspace( } // 3) fork a new contentStream, based on the matching content stream, and apply REST - $remainingContentStream = $command->contentStreamIdentifierForRemainingPart; + $remainingContentStream = $command->contentStreamIdForRemainingPart; $contentRepository->handle( new ForkContentStream( $remainingContentStream, $matchingContentStream, - $command->initiatingUserIdentifier + $command->initiatingUserId ) )->block(); @@ -559,7 +559,7 @@ public function handlePublishIndividualNodesFromWorkspace( // 4) if that all worked out, take EVENTS(MATCHING) and apply them to base WS. $this->publishContentStream( $matchingContentStream, - $baseWorkspace->currentContentStreamIdentifier + $baseWorkspace->currentContentStreamId )?->block(); // 5) TODO Re-target base workspace @@ -572,9 +572,9 @@ public function handlePublishIndividualNodesFromWorkspace( $command->workspaceName, $baseWorkspace->workspaceName, $remainingContentStream, - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, $command->nodesToPublish, - $command->initiatingUserIdentifier + $command->initiatingUserId ), ); @@ -606,18 +606,18 @@ public function handleDiscardIndividualNodesFromWorkspace( // 1) filter commands, only keeping the ones NOT MATCHING the nodes from the command // (i.e. the modifications we want to keep) - $workspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $workspace->currentContentStreamIdentifier + $workspaceContentStreamName = ContentStreamEventStreamName::fromContentStreamId( + $workspace->currentContentStreamId ); $originalCommands = $this->extractCommandsFromContentStreamMetadata($workspaceContentStreamName); $commandsToKeep = []; foreach ($originalCommands as $originalCommand) { - if (!$originalCommand instanceof MatchableWithNodeIdentifierToPublishOrDiscardInterface) { + if (!$originalCommand instanceof MatchableWithNodeIdToPublishOrDiscardInterface) { throw new \Exception( 'Command class ' . get_class($originalCommand) . ' does not implement ' - . MatchableWithNodeIdentifierToPublishOrDiscardInterface::class, + . MatchableWithNodeIdToPublishOrDiscardInterface::class, 1645393476 ); } @@ -627,12 +627,12 @@ public function handleDiscardIndividualNodesFromWorkspace( } // 2) fork a new contentStream, based on the base WS, and apply the commands to keep - $newContentStream = $command->newContentStreamIdentifier; + $newContentStream = $command->newContentStreamId; $contentRepository->handle( new ForkContentStream( $newContentStream, - $baseWorkspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $baseWorkspace->currentContentStreamId, + $command->initiatingUserId ) )->block(); @@ -655,9 +655,9 @@ public function handleDiscardIndividualNodesFromWorkspace( new WorkspaceWasPartiallyDiscarded( $command->workspaceName, $newContentStream, - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, $command->nodesToDiscard, - $command->initiatingUserIdentifier + $command->initiatingUserId ) ); @@ -671,11 +671,11 @@ public function handleDiscardIndividualNodesFromWorkspace( } private function commandMatchesAtLeastOneNode( - MatchableWithNodeIdentifierToPublishOrDiscardInterface $command, - NodeIdentifiersToPublishOrDiscard $nodeIdentifiers + MatchableWithNodeIdToPublishOrDiscardInterface $command, + NodeIdsToPublishOrDiscard $nodeIds ): bool { - foreach ($nodeIdentifiers as $nodeIdentifier) { - if ($command->matchesNodeIdentifier($nodeIdentifier)) { + foreach ($nodeIds as $nodeId) { + if ($command->matchesNodeId($nodeId)) { return true; } } @@ -695,12 +695,12 @@ public function handleDiscardWorkspace( $workspace = $this->requireWorkspace($command->workspaceName, $contentRepository); $baseWorkspace = $this->requireBaseWorkspace($workspace, $contentRepository); - $newContentStream = $command->newContentStreamIdentifier; + $newContentStream = $command->newContentStreamId; $contentRepository->handle( new ForkContentStream( $newContentStream, - $baseWorkspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $baseWorkspace->currentContentStreamId, + $command->initiatingUserId ) )->block(); @@ -710,8 +710,8 @@ public function handleDiscardWorkspace( new WorkspaceWasDiscarded( $command->workspaceName, $newContentStream, - $workspace->currentContentStreamIdentifier, - $command->initiatingUserIdentifier + $workspace->currentContentStreamId, + $command->initiatingUserId ) ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php index 5d5684fbb45..7c842d30cb2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php @@ -15,8 +15,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -34,8 +34,8 @@ public function __construct( public readonly WorkspaceName $workspaceName, public readonly WorkspaceTitle $workspaceTitle, public readonly WorkspaceDescription $workspaceDescription, - public readonly UserIdentifier $initiatingUserIdentifier, - public readonly ContentStreamIdentifier $newContentStreamIdentifier + public readonly UserId $initiatingUserId, + public readonly ContentStreamId $newContentStreamId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateWorkspace.php index b33d91b220e..47449198492 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateWorkspace.php @@ -15,8 +15,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -33,13 +33,13 @@ public function __construct( public readonly WorkspaceName $baseWorkspaceName, public readonly WorkspaceTitle $workspaceTitle, public readonly WorkspaceDescription $workspaceDescription, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly UserId $initiatingUserId, /** * the content stream identifier for the content stream which is created together with the to-be-created * workspace */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier, - public readonly ?UserIdentifier $workspaceOwner = null + public readonly ContentStreamId $newContentStreamId, + public readonly ?UserId $workspaceOwner = null ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/RootWorkspaceWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/RootWorkspaceWasCreated.php index 4673b1d9ba8..2fa7d93a0ff 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/RootWorkspaceWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/RootWorkspaceWasCreated.php @@ -15,8 +15,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspaceCreation\Event; use Neos\ContentRepository\Core\Feature\ContentStreamCreation\Event\ContentStreamWasCreated; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -36,8 +36,8 @@ public function __construct( public readonly WorkspaceName $workspaceName, public readonly WorkspaceTitle $workspaceTitle, public readonly WorkspaceDescription $workspaceDescription, - public readonly UserIdentifier $initiatingUserIdentifier, - public readonly ContentStreamIdentifier $newContentStreamIdentifier + public readonly UserId $initiatingUserId, + public readonly ContentStreamId $newContentStreamId ) { } @@ -47,8 +47,8 @@ public static function fromArray(array $values): self WorkspaceName::fromString($values['workspaceName']), WorkspaceTitle::fromString($values['workspaceTitle']), WorkspaceDescription::fromString($values['workspaceDescription']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), - ContentStreamIdentifier::fromString($values['newContentStreamIdentifier']), + UserId::fromString($values['initiatingUserId']), + ContentStreamId::fromString($values['newContentStreamId']), ); } @@ -58,8 +58,8 @@ public function jsonSerialize(): array 'workspaceName' => $this->workspaceName, 'workspaceTitle' => $this->workspaceTitle, 'workspaceDescription' => $this->workspaceDescription, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, - 'newContentStreamIdentifier' => $this->newContentStreamIdentifier, + 'initiatingUserId' => $this->initiatingUserId, + 'newContentStreamId' => $this->newContentStreamId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/WorkspaceWasCreated.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/WorkspaceWasCreated.php index 25ac87ed787..059a06cef6f 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/WorkspaceWasCreated.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Event/WorkspaceWasCreated.php @@ -15,8 +15,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspaceCreation\Event; use Neos\ContentRepository\Core\Feature\ContentStreamForking\Event\ContentStreamWasForked; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -37,9 +37,9 @@ public function __construct( public readonly WorkspaceName $baseWorkspaceName, public readonly WorkspaceTitle $workspaceTitle, public readonly WorkspaceDescription $workspaceDescription, - public readonly UserIdentifier $initiatingUserIdentifier, - public readonly ContentStreamIdentifier $newContentStreamIdentifier, - public readonly ?UserIdentifier $workspaceOwner = null + public readonly UserId $initiatingUserId, + public readonly ContentStreamId $newContentStreamId, + public readonly ?UserId $workspaceOwner = null ) { } @@ -50,9 +50,9 @@ public static function fromArray(array $values): self WorkspaceName::fromString($values['baseWorkspaceName']), WorkspaceTitle::fromString($values['workspaceTitle']), WorkspaceDescription::fromString($values['workspaceDescription']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), - ContentStreamIdentifier::fromString($values['newContentStreamIdentifier']), - $values['workspaceOwner'] ? UserIdentifier::fromString($values['workspaceOwner']) : null + UserId::fromString($values['initiatingUserId']), + ContentStreamId::fromString($values['newContentStreamId']), + $values['workspaceOwner'] ? UserId::fromString($values['workspaceOwner']) : null ); } @@ -63,8 +63,8 @@ public function jsonSerialize(): array 'baseWorkspaceName' => $this->baseWorkspaceName, 'workspaceTitle' => $this->workspaceTitle, 'workspaceDescription' => $this->workspaceDescription, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, - 'newContentStreamIdentifier' => $this->newContentStreamIdentifier, + 'initiatingUserId' => $this->initiatingUserId, + 'newContentStreamId' => $this->newContentStreamId, 'workspaceOwner' => $this->workspaceOwner ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php index b9bb6d00c6b..7173737e428 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php @@ -15,9 +15,9 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -29,26 +29,26 @@ final class DiscardIndividualNodesFromWorkspace implements CommandInterface { private function __construct( public readonly WorkspaceName $workspaceName, - public readonly NodeIdentifiersToPublishOrDiscard $nodesToDiscard, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly NodeIdsToPublishOrDiscard $nodesToDiscard, + public readonly UserId $initiatingUserId, /** - * Content Stream Identifier of the newly created fork, which contains the remaining changes which were + * Content Stream Id of the newly created fork, which contains the remaining changes which were * not removed */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier + public readonly ContentStreamId $newContentStreamId ) { } public static function create( WorkspaceName $workspaceName, - NodeIdentifiersToPublishOrDiscard $nodesToDiscard, - UserIdentifier $initiatingUserIdentifier + NodeIdsToPublishOrDiscard $nodesToDiscard, + UserId $initiatingUserId ): self { return new self( $workspaceName, $nodesToDiscard, - $initiatingUserIdentifier, - ContentStreamIdentifier::create() + $initiatingUserId, + ContentStreamId::create() ); } @@ -57,10 +57,10 @@ public static function create( */ public static function createFullyDeterministic( WorkspaceName $workspaceName, - NodeIdentifiersToPublishOrDiscard $nodesToDiscard, - UserIdentifier $initiatingUserIdentifier, - ContentStreamIdentifier $newContentStreamIdentifier + NodeIdsToPublishOrDiscard $nodesToDiscard, + UserId $initiatingUserId, + ContentStreamId $newContentStreamId ): self { - return new self($workspaceName, $nodesToDiscard, $initiatingUserIdentifier, $newContentStreamIdentifier); + return new self($workspaceName, $nodesToDiscard, $initiatingUserId, $newContentStreamId); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php index 8f07c8ee1f4..0483f80b722 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php @@ -15,8 +15,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -28,18 +28,18 @@ final class DiscardWorkspace implements CommandInterface { private function __construct( public readonly WorkspaceName $workspaceName, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly UserId $initiatingUserId, /** - * Content Stream Identifier of the newly created fork, which contains the remaining changes + * Content Stream ID of the newly created fork, which contains the remaining changes * which were not removed */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier + public readonly ContentStreamId $newContentStreamId ) { } - public static function create(WorkspaceName $workspaceName, UserIdentifier $initiatingUserIdentifier): self + public static function create(WorkspaceName $workspaceName, UserId $initiatingUserId): self { - return new self($workspaceName, $initiatingUserIdentifier, ContentStreamIdentifier::create()); + return new self($workspaceName, $initiatingUserId, ContentStreamId::create()); } /** @@ -47,9 +47,9 @@ public static function create(WorkspaceName $workspaceName, UserIdentifier $init */ public static function createFullyDeterministic( WorkspaceName $workspaceName, - UserIdentifier $initiatingUserIdentifier, - ContentStreamIdentifier $newContentStreamIdentifier + UserId $initiatingUserId, + ContentStreamId $newContentStreamId ): self { - return new self($workspaceName, $initiatingUserIdentifier, $newContentStreamIdentifier); + return new self($workspaceName, $initiatingUserId, $newContentStreamId); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php index 8f9b69a03aa..522d79ac6e2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php @@ -15,9 +15,9 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -29,8 +29,8 @@ final class PublishIndividualNodesFromWorkspace implements CommandInterface { private function __construct( public readonly WorkspaceName $workspaceName, - public readonly NodeIdentifiersToPublishOrDiscard $nodesToPublish, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly NodeIdsToPublishOrDiscard $nodesToPublish, + public readonly UserId $initiatingUserId, /** * during the publish process, we sort the events so that the events we want to publish * come first. In this process, two new content streams are generated: @@ -38,31 +38,31 @@ private function __construct( * - the second one is based on the first one, and contains all the remaining events (which we want to keep * in the user workspace). * - * This property contains the identifier of the first content stream, so that this command + * This property contains the ID of the first content stream, so that this command * can run fully deterministic - we need this for the test cases. */ - public readonly ContentStreamIdentifier $contentStreamIdentifierForMatchingPart, + public readonly ContentStreamId $contentStreamIdForMatchingPart, /** - * See the description of {@see $contentStreamIdentifierForMatchingPart}. + * See the description of {@see $contentStreamIdForMatchingPart}. * - * This property contains the identifier of the second content stream, so that this command + * This property contains the ID of the second content stream, so that this command * can run fully deterministic - we need this for the test cases. */ - public readonly ContentStreamIdentifier $contentStreamIdentifierForRemainingPart + public readonly ContentStreamId $contentStreamIdForRemainingPart ) { } public static function create( WorkspaceName $workspaceName, - NodeIdentifiersToPublishOrDiscard $nodesToPublish, - UserIdentifier $initiatingUserIdentifier + NodeIdsToPublishOrDiscard $nodesToPublish, + UserId $initiatingUserId ): self { return new self( $workspaceName, $nodesToPublish, - $initiatingUserIdentifier, - ContentStreamIdentifier::create(), - ContentStreamIdentifier::create() + $initiatingUserId, + ContentStreamId::create(), + ContentStreamId::create() ); } @@ -71,17 +71,17 @@ public static function create( */ public static function createFullyDeterministic( WorkspaceName $workspaceName, - NodeIdentifiersToPublishOrDiscard $nodesToPublish, - UserIdentifier $initiatingUserIdentifier, - ContentStreamIdentifier $contentStreamIdentifierForMatchingPart, - ContentStreamIdentifier $contentStreamIdentifierForRemainingPart + NodeIdsToPublishOrDiscard $nodesToPublish, + UserId $initiatingUserId, + ContentStreamId $contentStreamIdForMatchingPart, + ContentStreamId $contentStreamIdForRemainingPart ): self { return new self( $workspaceName, $nodesToPublish, - $initiatingUserIdentifier, - $contentStreamIdentifierForMatchingPart, - $contentStreamIdentifierForRemainingPart + $initiatingUserId, + $contentStreamIdForMatchingPart, + $contentStreamIdForRemainingPart ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishWorkspace.php index a3e54b7c4ce..65b764b5fc2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishWorkspace.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -27,7 +27,7 @@ final class PublishWorkspace implements CommandInterface { public function __construct( public readonly WorkspaceName $workspaceName, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdentifierToPublishOrDiscard.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdToPublishOrDiscard.php similarity index 72% rename from Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdentifierToPublishOrDiscard.php rename to Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdToPublishOrDiscard.php index 31ca9e8a0a6..fc82430f4cf 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdentifierToPublishOrDiscard.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdToPublishOrDiscard.php @@ -17,11 +17,11 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\DiscardIndividualNodesFromWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishIndividualNodesFromWorkspace; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** - * A node identifier (Content Stream, NodeAggregateIdentifier, DimensionSpacePoint); used when + * A node id (Content Stream, NodeAggregateId, DimensionSpacePoint); used when * publishing or discarding individual nodes * ({@see \Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishIndividualNodesFromWorkspace} and * {@see \Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\DiscardIndividualNodesFromWorkspace} @@ -29,11 +29,11 @@ * * @api used as part of commands */ -final class NodeIdentifierToPublishOrDiscard implements \JsonSerializable +final class NodeIdToPublishOrDiscard implements \JsonSerializable { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly DimensionSpacePoint $dimensionSpacePoint, ) { } @@ -44,8 +44,8 @@ public function __construct( public static function fromArray(array $array): self { return new self( - ContentStreamIdentifier::fromString($array['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($array['nodeAggregateIdentifier']), + ContentStreamId::fromString($array['contentStreamId']), + NodeAggregateId::fromString($array['nodeAggregateId']), DimensionSpacePoint::fromArray($array['dimensionSpacePoint']), ); } @@ -56,8 +56,8 @@ public static function fromArray(array $array): self public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'dimensionSpacePoint' => $this->dimensionSpacePoint, ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdentifiersToPublishOrDiscard.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdentifiersToPublishOrDiscard.php deleted file mode 100644 index 02874d53ac3..00000000000 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdentifiersToPublishOrDiscard.php +++ /dev/null @@ -1,80 +0,0 @@ - - * @api used as part of commands - */ -final class NodeIdentifiersToPublishOrDiscard implements \IteratorAggregate, \Countable, \JsonSerializable -{ - /** - * @var array - */ - public readonly array $nodeIdentifiers; - - /** - * @param array $nodeIdentifiers - */ - private function __construct(array $nodeIdentifiers) - { - $this->nodeIdentifiers = $nodeIdentifiers; - } - - public static function create(NodeIdentifierToPublishOrDiscard ...$nodeIdentifiers): self - { - return new self($nodeIdentifiers); - } - - /** - * @param array> $nodeIdentifierData - */ - public static function fromArray(array $nodeIdentifierData): self - { - return new self(array_map( - fn (array $nodeIdentifierDatum): NodeIdentifierToPublishOrDiscard => - NodeIdentifierToPublishOrDiscard::fromArray($nodeIdentifierDatum), - $nodeIdentifierData - )); - } - - public function merge(self $other): self - { - return new self(array_merge($this->nodeIdentifiers, $other->nodeIdentifiers)); - } - - /** - * @return \ArrayIterator - */ - public function getIterator(): \ArrayIterator - { - return new \ArrayIterator($this->nodeIdentifiers); - } - - public function count(): int - { - return count($this->nodeIdentifiers); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - return $this->nodeIdentifiers; - } -} diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdsToPublishOrDiscard.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdsToPublishOrDiscard.php new file mode 100644 index 00000000000..92579c409d0 --- /dev/null +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Dto/NodeIdsToPublishOrDiscard.php @@ -0,0 +1,79 @@ + + * @api used as part of commands + */ +final class NodeIdsToPublishOrDiscard implements \IteratorAggregate, \Countable, \JsonSerializable +{ + /** + * @var array + */ + public readonly array $nodeIds; + + /** + * @param array $nodeIds + */ + private function __construct(array $nodeIds) + { + $this->nodeIds = $nodeIds; + } + + public static function create(NodeIdToPublishOrDiscard ...$nodeIds): self + { + return new self($nodeIds); + } + + /** + * @param array> $nodeIdData + */ + public static function fromArray(array $nodeIdData): self + { + return new self(array_map( + fn (array $nodeIdDatum): NodeIdToPublishOrDiscard => NodeIdToPublishOrDiscard::fromArray($nodeIdDatum), + $nodeIdData + )); + } + + public function merge(self $other): self + { + return new self(array_merge($this->nodeIds, $other->nodeIds)); + } + + /** + * @return \ArrayIterator + */ + public function getIterator(): \ArrayIterator + { + return new \ArrayIterator($this->nodeIds); + } + + public function count(): int + { + return count($this->nodeIds); + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + return $this->nodeIds; + } +} diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasDiscarded.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasDiscarded.php index 089436df7a7..e5781c43132 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasDiscarded.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasDiscarded.php @@ -14,8 +14,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -29,12 +29,12 @@ public function __construct( /** * The new, empty, content stream */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier, + public readonly ContentStreamId $newContentStreamId, /** * The old content stream (which contains the discarded data) */ - public readonly ContentStreamIdentifier $previousContentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $previousContentStreamId, + public readonly UserId $initiatingUserId ) { } @@ -42,9 +42,9 @@ public static function fromArray(array $values): self { return new self( WorkspaceName::fromString($values['workspaceName']), - ContentStreamIdentifier::fromString($values['newContentStreamIdentifier']), - ContentStreamIdentifier::fromString($values['previousContentStreamIdentifier']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + ContentStreamId::fromString($values['newContentStreamId']), + ContentStreamId::fromString($values['previousContentStreamId']), + UserId::fromString($values['initiatingUserId']) ); } @@ -52,9 +52,9 @@ public function jsonSerialize(): array { return [ 'workspaceName' => $this->workspaceName, - 'newContentStreamIdentifier' => $this->newContentStreamIdentifier, - 'previousContentStreamIdentifier' => $this->previousContentStreamIdentifier, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'newContentStreamId' => $this->newContentStreamId, + 'previousContentStreamId' => $this->previousContentStreamId, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyDiscarded.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyDiscarded.php index d2db73090aa..ccafdc6356c 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyDiscarded.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyDiscarded.php @@ -14,9 +14,9 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Event; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -30,13 +30,13 @@ public function __construct( /** * The new content stream; containing the data which we want to keep */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier, + public readonly ContentStreamId $newContentStreamId, /** * The old content stream, which contains ALL the data (discarded and non-discarded) */ - public readonly ContentStreamIdentifier $previousContentStreamIdentifier, - public readonly NodeIdentifiersToPublishOrDiscard $discardedNodes, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $previousContentStreamId, + public readonly NodeIdsToPublishOrDiscard $discardedNodes, + public readonly UserId $initiatingUserId ) { } @@ -44,10 +44,10 @@ public static function fromArray(array $values): self { return new self( WorkspaceName::fromString($values['workspaceName']), - ContentStreamIdentifier::fromString($values['newContentStreamIdentifier']), - ContentStreamIdentifier::fromString($values['previousContentStreamIdentifier']), - NodeIdentifiersToPublishOrDiscard::fromArray($values['discardedNodes']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + ContentStreamId::fromString($values['newContentStreamId']), + ContentStreamId::fromString($values['previousContentStreamId']), + NodeIdsToPublishOrDiscard::fromArray($values['discardedNodes']), + UserId::fromString($values['initiatingUserId']) ); } @@ -55,10 +55,10 @@ public function jsonSerialize(): array { return [ 'workspaceName' => $this->workspaceName, - 'newContentStreamIdentifier' => $this->newContentStreamIdentifier, - 'previousContentStreamIdentifier' => $this->previousContentStreamIdentifier, + 'newContentStreamId' => $this->newContentStreamId, + 'previousContentStreamId' => $this->previousContentStreamId, 'discardedNodes' => $this->discardedNodes, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyPublished.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyPublished.php index ccc90bf8cc6..1b5b1d1020a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyPublished.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPartiallyPublished.php @@ -14,9 +14,9 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Event; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -37,13 +37,13 @@ public function __construct( /** * The new content stream for the $sourceWorkspaceName */ - public readonly ContentStreamIdentifier $newSourceContentStreamIdentifier, + public readonly ContentStreamId $newSourceContentStreamId, /** * The old content stream, which contains ALL the data (discarded and non-discarded) */ - public readonly ContentStreamIdentifier $previousSourceContentStreamIdentifier, - public readonly NodeIdentifiersToPublishOrDiscard $publishedNodes, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $previousSourceContentStreamId, + public readonly NodeIdsToPublishOrDiscard $publishedNodes, + public readonly UserId $initiatingUserId ) { } @@ -52,10 +52,10 @@ public static function fromArray(array $values): self return new self( WorkspaceName::fromString($values['sourceWorkspaceName']), WorkspaceName::fromString($values['targetWorkspaceName']), - ContentStreamIdentifier::fromString($values['newSourceContentStreamIdentifier']), - ContentStreamIdentifier::fromString($values['previousSourceContentStreamIdentifier']), - NodeIdentifiersToPublishOrDiscard::fromArray($values['publishedNodes']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + ContentStreamId::fromString($values['newSourceContentStreamId']), + ContentStreamId::fromString($values['previousSourceContentStreamId']), + NodeIdsToPublishOrDiscard::fromArray($values['publishedNodes']), + UserId::fromString($values['initiatingUserId']) ); } @@ -64,10 +64,10 @@ public function jsonSerialize(): array return [ 'sourceWorkspaceName' => $this->sourceWorkspaceName, 'targetWorkspaceName' => $this->targetWorkspaceName, - 'newSourceContentStreamIdentifier' => $this->newSourceContentStreamIdentifier, - 'previousSourceContentStreamIdentifier' => $this->previousSourceContentStreamIdentifier, + 'newSourceContentStreamId' => $this->newSourceContentStreamId, + 'previousSourceContentStreamId' => $this->previousSourceContentStreamId, 'publishedNodes' => $this->publishedNodes, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPublished.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPublished.php index 8f42dcbe301..6d4edfac746 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPublished.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Event/WorkspaceWasPublished.php @@ -14,8 +14,8 @@ * source code. */ -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -34,14 +34,14 @@ public function __construct( */ public readonly WorkspaceName $targetWorkspaceName, /** - * The new, empty content stream identifier of $sourceWorkspaceName, (after the publish was successful) + * The new, empty content stream ID of $sourceWorkspaceName, (after the publish was successful) */ - public readonly ContentStreamIdentifier $newSourceContentStreamIdentifier, + public readonly ContentStreamId $newSourceContentStreamId, /** - * The old content stream identifier of $sourceWorkspaceName (which is not active anymore now) + * The old content stream ID of $sourceWorkspaceName (which is not active anymore now) */ - public readonly ContentStreamIdentifier $previousSourceContentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $previousSourceContentStreamId, + public readonly UserId $initiatingUserId ) { } @@ -50,9 +50,9 @@ public static function fromArray(array $values): self return new self( WorkspaceName::fromString($values['sourceWorkspaceName']), WorkspaceName::fromString($values['targetWorkspaceName']), - ContentStreamIdentifier::fromString($values['newSourceContentStreamIdentifier']), - ContentStreamIdentifier::fromString($values['previousSourceContentStreamIdentifier']), - UserIdentifier::fromString($values['initiatingUserIdentifier']) + ContentStreamId::fromString($values['newSourceContentStreamId']), + ContentStreamId::fromString($values['previousSourceContentStreamId']), + UserId::fromString($values['initiatingUserId']) ); } @@ -61,9 +61,9 @@ public function jsonSerialize(): array return [ 'sourceWorkspaceName' => $this->sourceWorkspaceName, 'targetWorkspaceName' => $this->targetWorkspaceName, - 'newSourceContentStreamIdentifier' => $this->newSourceContentStreamIdentifier, - 'previousSourceContentStreamIdentifier' => $this->previousSourceContentStreamIdentifier, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'newSourceContentStreamId' => $this->newSourceContentStreamId, + 'previousSourceContentStreamId' => $this->previousSourceContentStreamId, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php index dbb508878b0..04eb67b7889 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php @@ -15,8 +15,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspaceRebase\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -28,17 +28,17 @@ final class RebaseWorkspace implements CommandInterface { public function __construct( public readonly WorkspaceName $workspaceName, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly UserId $initiatingUserId, /** * Name of the new content stream which is created during the rebase */ - public readonly ContentStreamIdentifier $rebasedContentStreamIdentifier + public readonly ContentStreamId $rebasedContentStreamId ) { } - public static function create(WorkspaceName $workspaceName, UserIdentifier $initiatingUserIdentifier): self + public static function create(WorkspaceName $workspaceName, UserId $initiatingUserId): self { - return new self($workspaceName, $initiatingUserIdentifier, ContentStreamIdentifier::create()); + return new self($workspaceName, $initiatingUserId, ContentStreamId::create()); } /** @@ -46,9 +46,9 @@ public static function create(WorkspaceName $workspaceName, UserIdentifier $init */ public static function createFullyDeterministic( WorkspaceName $workspaceName, - UserIdentifier $initiatingUserIdentifier, - ContentStreamIdentifier $newContentStreamIdentifier + UserId $initiatingUserId, + ContentStreamId $newContentStreamId ): self { - return new self($workspaceName, $initiatingUserIdentifier, $newContentStreamIdentifier); + return new self($workspaceName, $initiatingUserId, $newContentStreamId); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceRebaseFailed.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceRebaseFailed.php index 0c1861c4c60..4bcb82df7a4 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceRebaseFailed.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceRebaseFailed.php @@ -14,8 +14,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspaceRebase\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -33,12 +33,12 @@ public function __construct( * The content stream on which we could not apply the source content stream's commands -- i.e. the "failed" * state. */ - public readonly ContentStreamIdentifier $candidateContentStreamIdentifier, + public readonly ContentStreamId $candidateContentStreamId, /** * The content stream which we tried to rebase */ - public readonly ContentStreamIdentifier $sourceContentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier, + public readonly ContentStreamId $sourceContentStreamId, + public readonly UserId $initiatingUserId, public readonly array $errors ) { } @@ -47,9 +47,9 @@ public static function fromArray(array $values): self { return new self( WorkspaceName::fromString($values['workspaceName']), - ContentStreamIdentifier::fromString($values['candidateContentStreamIdentifier']), - ContentStreamIdentifier::fromString($values['sourceContentStreamIdentifier']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + ContentStreamId::fromString($values['candidateContentStreamId']), + ContentStreamId::fromString($values['sourceContentStreamId']), + UserId::fromString($values['initiatingUserId']), $values['errors'] ); } @@ -58,9 +58,9 @@ public function jsonSerialize(): array { return [ 'workspaceName' => $this->workspaceName, - 'candidateContentStreamIdentifier' => $this->candidateContentStreamIdentifier, - 'sourceContentStreamIdentifier' => $this->sourceContentStreamIdentifier, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'candidateContentStreamId' => $this->candidateContentStreamId, + 'sourceContentStreamId' => $this->sourceContentStreamId, + 'initiatingUserId' => $this->initiatingUserId, 'errors' => $this->errors ]; } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceWasRebased.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceWasRebased.php index e67aff43feb..141eb3551eb 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceWasRebased.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Event/WorkspaceWasRebased.php @@ -14,8 +14,8 @@ namespace Neos\ContentRepository\Core\Feature\WorkspaceRebase\Event; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\EventStore\EventInterface; @@ -27,14 +27,14 @@ final class WorkspaceWasRebased implements EventInterface public function __construct( public readonly WorkspaceName $workspaceName, /** - * The new content stream identifier (after the rebase was successful) + * The new content stream ID (after the rebase was successful) */ - public readonly ContentStreamIdentifier $newContentStreamIdentifier, + public readonly ContentStreamId $newContentStreamId, /** - * The old content stream identifier (which is not active anymore now) + * The old content stream ID (which is not active anymore now) */ - public readonly ContentStreamIdentifier $previousContentStreamIdentifier, - public readonly UserIdentifier $initiatingUserIdentifier + public readonly ContentStreamId $previousContentStreamId, + public readonly UserId $initiatingUserId ) { } @@ -42,9 +42,9 @@ public static function fromArray(array $values): self { return new self( WorkspaceName::fromString($values['workspaceName']), - ContentStreamIdentifier::fromString($values['newContentStreamIdentifier']), - ContentStreamIdentifier::fromString($values['previousContentStreamIdentifier']), - UserIdentifier::fromString($values['initiatingUserIdentifier']), + ContentStreamId::fromString($values['newContentStreamId']), + ContentStreamId::fromString($values['previousContentStreamId']), + UserId::fromString($values['initiatingUserId']), ); } @@ -52,9 +52,9 @@ public function jsonSerialize(): array { return [ 'workspaceName' => $this->workspaceName, - 'newContentStreamIdentifier' => $this->newContentStreamIdentifier, - 'previousContentStreamIdentifier' => $this->previousContentStreamIdentifier, - 'initiatingUserIdentifier' => $this->initiatingUserIdentifier, + 'newContentStreamId' => $this->newContentStreamId, + 'previousContentStreamId' => $this->previousContentStreamId, + 'initiatingUserId' => $this->initiatingUserId, ]; } } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphInterface.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphInterface.php index 7e96c36d279..916628486e6 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphInterface.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphInterface.php @@ -17,8 +17,8 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Projection\ProjectionStateInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -37,19 +37,20 @@ interface ContentGraphInterface extends ProjectionStateInterface { public function getSubgraph( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, VisibilityConstraints $visibilityConstraints ): ContentSubgraphInterface; - public function findNodeByIdentifiers( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + // TODO: ONLY RELEVANT FOR TESTCASES + public function findNodeById( + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint ): ?Node; public function findRootNodeAggregateByType( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeTypeName $nodeTypeName ): NodeAggregate; @@ -57,16 +58,16 @@ public function findRootNodeAggregateByType( * @return iterable */ public function findNodeAggregatesByType( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeTypeName $nodeTypeName ): iterable; /** * @throws NodeAggregatesTypeIsAmbiguous */ - public function findNodeAggregateByIdentifier( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + public function findNodeAggregateById( + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId ): ?NodeAggregate; /** @@ -74,8 +75,8 @@ public function findNodeAggregateByIdentifier( * @internal only for consumption inside the Command Handler */ public function findParentNodeAggregateByChildOriginDimensionSpacePoint( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint ): ?NodeAggregate; @@ -84,8 +85,8 @@ public function findParentNodeAggregateByChildOriginDimensionSpacePoint( * @internal only for consumption inside the Command Handler */ public function findParentNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $childNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $childNodeAggregateId ): iterable; /** @@ -93,8 +94,8 @@ public function findParentNodeAggregates( * @internal only for consumption inside the Command Handler */ public function findChildNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId ): iterable; /** @@ -105,8 +106,8 @@ public function findChildNodeAggregates( * @internal only for consumption inside the Command Handler */ public function findChildNodeAggregatesByName( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId, NodeName $name ): iterable; @@ -115,17 +116,17 @@ public function findChildNodeAggregatesByName( * @internal only for consumption inside the Command Handler */ public function findTetheredChildNodeAggregates( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier + ContentStreamId $contentStreamId, + NodeAggregateId $parentNodeAggregateId ): iterable; /** * @internal only for consumption inside the Command Handler */ public function getDimensionSpacePointsOccupiedByChildNodeName( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeName $nodeName, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $parentNodeOriginDimensionSpacePoint, DimensionSpacePointSet $dimensionSpacePointsToCheck ): DimensionSpacePointSet; diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphIdentity.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphIdentity.php index 23fe4a9151f..9ec8aaa52a0 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphIdentity.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphIdentity.php @@ -4,19 +4,19 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; /** * This describes a node's read model identity parts which are rooted in the {@see ContentSubgraphInterface}, namely: - * - {@see contentRepositoryIdentifier} - * - {@see contentStreamIdentifier} + * - {@see ContentRepositoryId} + * - {@see ContentStreamId} * - {@see dimensionSpacePoint} * - {@see visibilityConstraints} * * In addition to the above subgraph identity, a Node's read model identity is further described - * by {@see Node::$nodeAggregateIdentifier}. + * by {@see Node::$nodeAggregateId}. * * With the above information, you can fetch a Subgraph directly by using * {@see ContentRepositoryRegistry::subgraphForNode()}. @@ -38,8 +38,8 @@ final class ContentSubgraphIdentity { private function __construct( - public readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentRepositoryId $contentRepositoryId, + public readonly ContentStreamId $contentStreamId, /** * DimensionSpacePoint a node has been accessed in. */ @@ -52,14 +52,14 @@ private function __construct( * @api */ public static function create( - ContentRepositoryIdentifier $contentRepositoryIdentifier, - ContentStreamIdentifier $contentStreamIdentifier, + ContentRepositoryId $contentRepositoryId, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, VisibilityConstraints $visibilityConstraints ): self { return new self( - $contentRepositoryIdentifier, - $contentStreamIdentifier, + $contentRepositoryId, + $contentStreamId, $dimensionSpacePoint, $visibilityConstraints ); @@ -67,17 +67,17 @@ public static function create( public function equals(ContentSubgraphIdentity $other): bool { - return $this->contentRepositoryIdentifier->equals($other->contentRepositoryIdentifier) - && $this->contentStreamIdentifier->equals($other->contentStreamIdentifier) + return $this->contentRepositoryId->equals($other->contentRepositoryId) + && $this->contentStreamId->equals($other->contentStreamId) && $this->dimensionSpacePoint->equals($other->dimensionSpacePoint) && $this->visibilityConstraints->getHash() === $other->visibilityConstraints->getHash(); } - public function withContentStreamIdentifier(ContentStreamIdentifier $contentStreamIdentifier): self + public function withContentStreamId(ContentStreamId $contentStreamId): self { return new self( - $this->contentRepositoryIdentifier, - $contentStreamIdentifier, + $this->contentRepositoryId, + $contentStreamId, $this->dimensionSpacePoint, $this->visibilityConstraints ); @@ -86,8 +86,8 @@ public function withContentStreamIdentifier(ContentStreamIdentifier $contentStre public function withVisibilityConstraints(VisibilityConstraints $visibilityConstraints): self { return new self( - $this->contentRepositoryIdentifier, - $this->contentStreamIdentifier, + $this->contentRepositoryId, + $this->contentStreamId, $this->dimensionSpacePoint, $visibilityConstraints ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php index c607b7c554d..7a68054004f 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php @@ -16,13 +16,13 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints; use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; /** @@ -37,7 +37,7 @@ * From the central Content Repository instance, you can fetch the singleton * {@see ContentGraphInterface}. There, you can call * {@see ContentGraphInterface::getSubgraph()} and pass in - * the {@see ContentStreamIdentifier}, {@see DimensionSpacePoint} and + * the {@see ContentStreamId}, {@see DimensionSpacePoint} and * {@see VisibilityConstraints} you want to have. * * @@ -53,124 +53,124 @@ interface ContentSubgraphInterface extends \JsonSerializable { /** - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset * @return Nodes */ public function findChildNodes( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes; public function findReferencedNodes( - NodeAggregateIdentifier $nodeAggregateAggregateIdentifier, + NodeAggregateId $nodeAggregateId, PropertyName $name = null ): References; public function findReferencingNodes( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, PropertyName $name = null ): References; /** * TODO: RENAME: findById? or findByNodeAggregateId? - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateId * @return Node|null */ - public function findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): ?Node; + public function findNodeByNodeAggregateId(NodeAggregateId $nodeAggregateId): ?Node; /** - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param NodeTypeConstraints|null $nodeTypeConstraints * @return int */ public function countChildNodes( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeTypeConstraints $nodeTypeConstraints = null ): int; /** - * @param NodeAggregateIdentifier $childNodeAggregateIdentifier + * @param NodeAggregateId $childNodeAggregateId * @return Node|null */ - public function findParentNode(NodeAggregateIdentifier $childNodeAggregateIdentifier): ?Node; + public function findParentNode(NodeAggregateId $childNodeAggregateId): ?Node; /** * @param NodePath $path - * @param NodeAggregateIdentifier $startingNodeAggregateIdentifier + * @param NodeAggregateId $startingNodeAggregateId * @return Node|null */ public function findNodeByPath( NodePath $path, - NodeAggregateIdentifier $startingNodeAggregateIdentifier + NodeAggregateId $startingNodeAggregateId ): ?Node; /** - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param NodeName $edgeName * @return Node|null */ public function findChildNodeConnectedThroughEdgeName( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, NodeName $edgeName ): ?Node; /** - * @param NodeAggregateIdentifier $sibling + * @param NodeAggregateId $sibling * @param NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset * @return Nodes */ public function findSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, ?NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes; /** - * @param NodeAggregateIdentifier $sibling + * @param NodeAggregateId $sibling * @param NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset * @return Nodes */ public function findSucceedingSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, ?NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes; /** - * @param NodeAggregateIdentifier $sibling + * @param NodeAggregateId $sibling * @param NodeTypeConstraints|null $nodeTypeConstraints * @param int|null $limit * @param int|null $offset * @return Nodes */ public function findPrecedingSiblings( - NodeAggregateIdentifier $sibling, + NodeAggregateId $sibling, ?NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): Nodes; /** - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateId * @return NodePath */ - public function findNodePath(NodeAggregateIdentifier $nodeAggregateIdentifier): NodePath; + public function findNodePath(NodeAggregateId $nodeAggregateId): NodePath; /** - * @return ContentStreamIdentifier + * @return ContentStreamId */ - public function getContentStreamIdentifier(): ContentStreamIdentifier; + public function getContentStreamId(): ContentStreamId; /** * @return DimensionSpacePoint @@ -178,24 +178,24 @@ public function getContentStreamIdentifier(): ContentStreamIdentifier; public function getDimensionSpacePoint(): DimensionSpacePoint; public function findSubtrees( - NodeAggregateIdentifiers $entryNodeAggregateIdentifiers, + NodeAggregateIds $entryNodeAggregateIds, int $maximumLevels, NodeTypeConstraints $nodeTypeConstraints ): Subtree; /** - * Recursively find all nodes underneath the $entryNodeAggregateIdentifiers, + * Recursively find all nodes underneath the $entryNodeAggregateIds, * which match the node type constraints specified by NodeTypeConstraints. * * If a Search Term is specified, the properties are searched for this search term. * - * @param array $entryNodeAggregateIdentifiers + * @param array $entryNodeAggregateIds * @param NodeTypeConstraints $nodeTypeConstraints * @param SearchTerm|null $searchTerm * @return Nodes */ public function findDescendants( - array $entryNodeAggregateIdentifiers, + array $entryNodeAggregateIds, NodeTypeConstraints $nodeTypeConstraints, ?SearchTerm $searchTerm ): Nodes; diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php index fd883beb141..935d6530777 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\Projection\ContentGraph; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; @@ -41,15 +41,15 @@ final class Node public function __construct( public readonly ContentSubgraphIdentity $subgraphIdentity, /** - * NodeAggregateIdentifier (identifier) of this node + * NodeAggregateId (identifier) of this node * This is part of the node's "Read Model" identity, whis is defined by: * - {@see getSubgraphIdentitity} - * - {@see getNodeAggregateIdentifier} (this method) + * - {@see getNodeAggregateId} (this method) * * With the above information, you can fetch a Subgraph using {@see ContentGraphInterface::getSubgraph()}. * or {@see ContentRepositoryRegistry::subgraphForNode()} */ - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateId, /** * returns the DimensionSpacePoint the node is at home in. Usually needed to address a Node in a NodeAggregate * in order to update it. @@ -112,6 +112,6 @@ public function getLabel(): string public function equals(Node $other): bool { return $this->subgraphIdentity->equals($other->subgraphIdentity) - && $this->nodeAggregateIdentifier->equals($other->nodeAggregateIdentifier); + && $this->nodeAggregateId->equals($other->nodeAggregateId); } } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php index 299bd34600d..e7e8b706404 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Projection\ContentGraph\CoverageByOrigin; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint; @@ -24,7 +24,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\OriginByCoverage; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -53,8 +53,8 @@ final class NodeAggregate { public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly ContentStreamId $contentStreamId, + public readonly NodeAggregateId $nodeAggregateId, public readonly NodeAggregateClassification $classification, public readonly NodeTypeName $nodeTypeName, public readonly ?NodeName $nodeName, @@ -94,7 +94,7 @@ public function getNodeByOccupiedDimensionSpacePoint( ): Node { if (!$this->occupiedDimensionSpacePoints->contains($occupiedDimensionSpacePoint)) { throw NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint::butWasSupposedTo( - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $occupiedDimensionSpacePoint ); } @@ -113,7 +113,7 @@ public function getCoverageByOccupant( $coverage = $this->coverageByOccupant->getCoverage($occupiedDimensionSpacePoint); if (is_null($coverage)) { throw NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint::butWasSupposedTo( - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $occupiedDimensionSpacePoint ); } @@ -125,7 +125,7 @@ public function getNodeByCoveredDimensionSpacePoint(DimensionSpacePoint $covered { if (!isset($this->coveredDimensionSpacePoints[$coveredDimensionSpacePoint->hash])) { throw NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint::butWasSupposedTo( - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $coveredDimensionSpacePoint ); } @@ -138,7 +138,7 @@ public function getOccupationByCovered(DimensionSpacePoint $coveredDimensionSpac $occupation = $this->occupationByCovered->getOrigin($coveredDimensionSpacePoint); if (is_null($occupation)) { throw NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint::butWasSupposedTo( - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $coveredDimensionSpacePoint ); } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Nodes.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Nodes.php index cc17ca1d0e8..096e9edff9a 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Nodes.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Nodes.php @@ -130,7 +130,7 @@ private function getNodeIndex(Node $subject): int } throw new \InvalidArgumentException(sprintf( 'The node %s does not exist in this set', - $subject->nodeAggregateIdentifier + $subject->nodeAggregateId ), 1542901216); } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectionRunner.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectionRunner.php index c821a171852..cfabeca608e 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectionRunner.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectionRunner.php @@ -37,7 +37,7 @@ public function run(): Result $result->merge($this->projectionIntegrityViolationDetector->hierarchyIntegrityIsProvided()); $result->merge($this->projectionIntegrityViolationDetector->tetheredNodesAreNamed()); $result->merge($this->projectionIntegrityViolationDetector->allNodesAreConnectedToARootNodePerSubgraph()); - $result->merge($this->projectionIntegrityViolationDetector->nodeAggregateIdentifiersAreUniquePerSubgraph()); + $result->merge($this->projectionIntegrityViolationDetector->nodeAggregateIdsAreUniquePerSubgraph()); $result->merge($this->projectionIntegrityViolationDetector->allNodesHaveAtMostOneParentPerSubgraph()); $result->merge($this->projectionIntegrityViolationDetector ->nodeAggregatesAreConsistentlyTypedPerContentStream()); diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectorInterface.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectorInterface.php index eb65df4b0d8..416a8b62e75 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectorInterface.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ProjectionIntegrityViolationDetectorInterface.php @@ -54,8 +54,8 @@ interface ProjectionIntegrityViolationDetectorInterface * Additionally, checks that e.g. dimensionSpacePoint and dimensionSpacePointHash match; and same for * originDimensionSpacePoint and originDimensionSpacePointHash. * - * Additionally, checks that a hierarchy edge (identified by source node aggregate identifier, - * target node aggregate identifier, dimension space point and content stream identifier) + * Additionally, checks that a hierarchy edge (identified by source node aggregate id, + * target node aggregate id, dimension space point and content stream id) * exists at most once. */ public function hierarchyIntegrityIsProvided(): Result; @@ -195,7 +195,7 @@ public function nonRootNodesHaveParents(): Result; /** * Checks that per subgraph (Dimension Space Point + Content Stream), - * a Node Aggregate Identifier does not appear more than once. + * a Node Aggregate id does not appear more than once. * * ╱ ╲ <-- these two edges are from the same subgraph. * ╱ ╲ @@ -203,7 +203,7 @@ public function nonRootNodesHaveParents(): Result; * │ B │ │ B │ * └─────┘ └─────┘ */ - public function nodeAggregateIdentifiersAreUniquePerSubgraph(): Result; + public function nodeAggregateIdsAreUniquePerSubgraph(): Result; /** * Checks that per content stream (NOT per subgraph), a Node Aggregate has diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamFinder.php b/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamFinder.php index d0c2dabd624..296e79a36a0 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamFinder.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamFinder.php @@ -18,7 +18,7 @@ use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ProjectionStateInterface; use Neos\ContentRepository\Core\Service\ContentStreamPruner; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\EventStore\Model\Event\Version; use Neos\EventStore\Model\EventStream\MaybeVersion; @@ -42,34 +42,34 @@ public function __construct( } /** - * @return iterable + * @return iterable */ - public function findAllIdentifiers(): iterable + public function findAllIds(): iterable { $connection = $this->client->getConnection(); $databaseRows = $connection->executeQuery( ' - SELECT contentStreamIdentifier FROM ' . $this->tableName . ' + SELECT contentStreamId FROM ' . $this->tableName . ' ', )->fetchAllAssociative(); return array_map( - fn (array $databaseRow): ContentStreamIdentifier => ContentStreamIdentifier::fromString( - $databaseRow['contentStreamIdentifier'] + fn (array $databaseRow): ContentStreamId => ContentStreamId::fromString( + $databaseRow['contentStreamId'] ), $databaseRows ); } /** - * @return array + * @return array */ public function findUnusedContentStreams(): iterable { $connection = $this->client->getConnection(); $databaseRows = $connection->executeQuery( ' - SELECT contentStreamIdentifier FROM ' . $this->tableName . ' + SELECT contentStreamId FROM ' . $this->tableName . ' WHERE removed = FALSE AND state IN (:state) ', @@ -86,28 +86,28 @@ public function findUnusedContentStreams(): iterable $contentStreams = []; foreach ($databaseRows as $databaseRow) { - $contentStreams[] = ContentStreamIdentifier::fromString($databaseRow['contentStreamIdentifier']); + $contentStreams[] = ContentStreamId::fromString($databaseRow['contentStreamId']); } return $contentStreams; } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamId * @return string one of the self::STATE_* constants */ - public function findStateForContentStream(ContentStreamIdentifier $contentStreamIdentifier): ?string + public function findStateForContentStream(ContentStreamId $contentStreamId): ?string { $connection = $this->client->getConnection(); /* @var $state string|false */ $state = $connection->executeQuery( ' SELECT state FROM ' . $this->tableName . ' - WHERE contentStreamIdentifier = :contentStreamIdentifier + WHERE contentStreamId = :contentStreamId AND removed = FALSE ', [ - 'contentStreamIdentifier' => $contentStreamIdentifier->jsonSerialize() + 'contentStreamId' => $contentStreamId->jsonSerialize() ] )->fetchColumn(); @@ -119,38 +119,38 @@ public function findStateForContentStream(ContentStreamIdentifier $contentStream } /** - * @return array + * @return array */ public function findUnusedAndRemovedContentStreams(): iterable { $connection = $this->client->getConnection(); $databaseRows = $connection->executeQuery( ' - WITH RECURSIVE transitiveUsedContentStreams (contentStreamIdentifier) AS ( + WITH RECURSIVE transitiveUsedContentStreams (contentStreamId) AS ( -- initial case: find all content streams currently in direct use by a workspace - SELECT contentStreamIdentifier FROM ' . $this->tableName . ' + SELECT contentStreamId FROM ' . $this->tableName . ' WHERE state = :inUseState AND removed = false UNION -- now, when a content stream is in use by a workspace, its source content stream is -- also "transitively" in use. - SELECT sourceContentStreamIdentifier FROM ' . $this->tableName . ' + SELECT sourceContentStreamId FROM ' . $this->tableName . ' JOIN transitiveUsedContentStreams - ON ' . $this->tableName . '.contentStreamIdentifier - = transitiveUsedContentStreams.contentStreamIdentifier + ON ' . $this->tableName . '.contentStreamId + = transitiveUsedContentStreams.contentStreamId WHERE - ' . $this->tableName . '.sourceContentStreamIdentifier IS NOT NULL + ' . $this->tableName . '.sourceContentStreamId IS NOT NULL ) -- now, we check for removed content streams which we do not need anymore transitively - SELECT contentStreamIdentifier FROM ' . $this->tableName . ' AS cs + SELECT contentStreamId FROM ' . $this->tableName . ' AS cs WHERE removed = true AND NOT EXISTS ( SELECT 1 FROM transitiveUsedContentStreams WHERE - cs.contentStreamIdentifier = transitiveUsedContentStreams.contentStreamIdentifier + cs.contentStreamId = transitiveUsedContentStreams.contentStreamId ) ', [ @@ -160,23 +160,23 @@ public function findUnusedAndRemovedContentStreams(): iterable $contentStreams = []; foreach ($databaseRows as $databaseRow) { - $contentStreams[] = ContentStreamIdentifier::fromString($databaseRow['contentStreamIdentifier']); + $contentStreams[] = ContentStreamId::fromString($databaseRow['contentStreamId']); } return $contentStreams; } - public function findVersionForContentStream(ContentStreamIdentifier $contentStreamIdentifier): MaybeVersion + public function findVersionForContentStream(ContentStreamId $contentStreamId): MaybeVersion { $connection = $this->client->getConnection(); /* @var $state string|false */ $version = $connection->executeQuery( ' SELECT version FROM ' . $this->tableName . ' - WHERE contentStreamIdentifier = :contentStreamIdentifier + WHERE contentStreamId = :contentStreamId ', [ - 'contentStreamIdentifier' => $contentStreamIdentifier->jsonSerialize() + 'contentStreamId' => $contentStreamId->jsonSerialize() ] )->fetchOne(); @@ -187,17 +187,17 @@ public function findVersionForContentStream(ContentStreamIdentifier $contentStre return MaybeVersion::fromVersionOrNull(Version::fromInteger($version)); } - public function hasContentStream(ContentStreamIdentifier $contentStreamIdentifier): bool + public function hasContentStream(ContentStreamId $contentStreamId): bool { $connection = $this->client->getConnection(); /* @var $state string|false */ $version = $connection->executeQuery( ' SELECT version FROM ' . $this->tableName . ' - WHERE contentStreamIdentifier = :contentStreamIdentifier + WHERE contentStreamId = :contentStreamId ', [ - 'contentStreamIdentifier' => $contentStreamIdentifier->jsonSerialize() + 'contentStreamId' => $contentStreamId->jsonSerialize() ] )->fetchOne(); diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjection.php b/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjection.php index d4a039089ef..1dd65f9e8ae 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjection.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjection.php @@ -21,12 +21,12 @@ use Doctrine\DBAL\Types\Types; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\EventStore\EventNormalizer; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ProjectionInterface; use Neos\ContentRepository\Core\Projection\ProjectionStateInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\ContentStreamCreation\Event\ContentStreamWasCreated; use Neos\ContentRepository\Core\Feature\ContentStreamForking\Event\ContentStreamWasForked; use Neos\ContentRepository\Core\Feature\ContentStreamRemoval\Event\ContentStreamWasRemoved; @@ -86,12 +86,12 @@ private function setupTables(): void $schema = new Schema(); $contentStreamTable = $schema->createTable($this->tableName); - $contentStreamTable->addColumn('contentStreamIdentifier', Types::STRING) + $contentStreamTable->addColumn('contentStreamId', Types::STRING) ->setLength(255) ->setNotnull(true); $contentStreamTable->addColumn('version', Types::INTEGER) ->setNotnull(true); - $contentStreamTable->addColumn('sourceContentStreamIdentifier', Types::STRING) + $contentStreamTable->addColumn('sourceContentStreamId', Types::STRING) ->setLength(255) ->setNotnull(false); $contentStreamTable->addColumn('state', Types::STRING) @@ -130,7 +130,7 @@ public function canHandle(Event $event): bool WorkspaceRebaseFailed::class, ContentStreamWasRemoved::class, ]) - || is_subclass_of($eventClassName, EmbedsContentStreamAndNodeAggregateIdentifier::class); + || is_subclass_of($eventClassName, EmbedsContentStreamAndNodeAggregateId::class); } public function catchUp(EventStreamInterface $eventStream, ContentRepository $contentRepository): void @@ -147,7 +147,7 @@ private function apply(EventEnvelope $eventEnvelope): void $eventInstance = $this->eventNormalizer->denormalize($eventEnvelope->event); - if ($eventInstance instanceof EmbedsContentStreamAndNodeAggregateIdentifier) { + if ($eventInstance instanceof EmbedsContentStreamAndNodeAggregateId) { $this->updateContentStreamVersion($eventInstance, $eventEnvelope); return; } @@ -187,7 +187,7 @@ public function getState(): ProjectionStateInterface private function whenContentStreamWasCreated(ContentStreamWasCreated $event, EventEnvelope $eventEnvelope): void { $this->getDatabaseConnection()->insert($this->tableName, [ - 'contentStreamIdentifier' => $event->contentStreamIdentifier, + 'contentStreamId' => $event->contentStreamId, 'version' => self::extractVersion($eventEnvelope), 'state' => ContentStreamFinder::STATE_CREATED, ]); @@ -199,7 +199,7 @@ private function whenRootWorkspaceWasCreated(RootWorkspaceWasCreated $event): vo $this->getDatabaseConnection()->update($this->tableName, [ 'state' => ContentStreamFinder::STATE_IN_USE_BY_WORKSPACE, ], [ - 'contentStreamIdentifier' => $event->newContentStreamIdentifier + 'contentStreamId' => $event->newContentStreamId ]); } @@ -209,16 +209,16 @@ private function whenWorkspaceWasCreated(WorkspaceWasCreated $event): void $this->getDatabaseConnection()->update($this->tableName, [ 'state' => ContentStreamFinder::STATE_IN_USE_BY_WORKSPACE, ], [ - 'contentStreamIdentifier' => $event->newContentStreamIdentifier + 'contentStreamId' => $event->newContentStreamId ]); } private function whenContentStreamWasForked(ContentStreamWasForked $event, EventEnvelope $eventEnvelope): void { $this->getDatabaseConnection()->insert($this->tableName, [ - 'contentStreamIdentifier' => $event->newContentStreamIdentifier, + 'contentStreamId' => $event->newContentStreamId, 'version' => self::extractVersion($eventEnvelope), - 'sourceContentStreamIdentifier' => $event->sourceContentStreamIdentifier, + 'sourceContentStreamId' => $event->sourceContentStreamId, 'state' => ContentStreamFinder::STATE_REBASING, // TODO: FORKED? ]); } @@ -227,13 +227,13 @@ private function whenWorkspaceWasDiscarded(WorkspaceWasDiscarded $event): void { // the new content stream is in use now $this->updateStateForContentStream( - $event->newContentStreamIdentifier, + $event->newContentStreamId, ContentStreamFinder::STATE_IN_USE_BY_WORKSPACE ); // the previous content stream is no longer in use $this->updateStateForContentStream( - $event->previousContentStreamIdentifier, + $event->previousContentStreamId, ContentStreamFinder::STATE_NO_LONGER_IN_USE ); } @@ -242,13 +242,13 @@ private function whenWorkspaceWasPartiallyDiscarded(WorkspaceWasPartiallyDiscard { // the new content stream is in use now $this->updateStateForContentStream( - $event->newContentStreamIdentifier, + $event->newContentStreamId, ContentStreamFinder::STATE_IN_USE_BY_WORKSPACE ); // the previous content stream is no longer in use $this->updateStateForContentStream( - $event->previousContentStreamIdentifier, + $event->previousContentStreamId, ContentStreamFinder::STATE_NO_LONGER_IN_USE ); } @@ -257,13 +257,13 @@ private function whenWorkspaceWasPartiallyPublished(WorkspaceWasPartiallyPublish { // the new content stream is in use now $this->updateStateForContentStream( - $event->newSourceContentStreamIdentifier, + $event->newSourceContentStreamId, ContentStreamFinder::STATE_IN_USE_BY_WORKSPACE ); // the previous content stream is no longer in use $this->updateStateForContentStream( - $event->previousSourceContentStreamIdentifier, + $event->previousSourceContentStreamId, ContentStreamFinder::STATE_NO_LONGER_IN_USE ); } @@ -272,13 +272,13 @@ private function whenWorkspaceWasPublished(WorkspaceWasPublished $event): void { // the new content stream is in use now $this->updateStateForContentStream( - $event->newSourceContentStreamIdentifier, + $event->newSourceContentStreamId, ContentStreamFinder::STATE_IN_USE_BY_WORKSPACE ); // the previous content stream is no longer in use $this->updateStateForContentStream( - $event->previousSourceContentStreamIdentifier, + $event->previousSourceContentStreamId, ContentStreamFinder::STATE_NO_LONGER_IN_USE ); } @@ -287,13 +287,13 @@ private function whenWorkspaceWasRebased(WorkspaceWasRebased $event): void { // the new content stream is in use now $this->updateStateForContentStream( - $event->newContentStreamIdentifier, + $event->newContentStreamId, ContentStreamFinder::STATE_IN_USE_BY_WORKSPACE ); // the previous content stream is no longer in use $this->updateStateForContentStream( - $event->previousContentStreamIdentifier, + $event->previousContentStreamId, ContentStreamFinder::STATE_NO_LONGER_IN_USE ); } @@ -301,7 +301,7 @@ private function whenWorkspaceWasRebased(WorkspaceWasRebased $event): void private function whenWorkspaceRebaseFailed(WorkspaceRebaseFailed $event): void { $this->updateStateForContentStream( - $event->candidateContentStreamIdentifier, + $event->candidateContentStreamId, ContentStreamFinder::STATE_REBASE_ERROR ); } @@ -312,16 +312,16 @@ private function whenContentStreamWasRemoved(ContentStreamWasRemoved $event, Eve 'removed' => true, 'version' => self::extractVersion($eventEnvelope), ], [ - 'contentStreamIdentifier' => $event->contentStreamIdentifier + 'contentStreamId' => $event->contentStreamId ]); } - private function updateStateForContentStream(ContentStreamIdentifier $contentStreamIdentifier, string $state): void + private function updateStateForContentStream(ContentStreamId $contentStreamId, string $state): void { $this->getDatabaseConnection()->update($this->tableName, [ 'state' => $state, ], [ - 'contentStreamIdentifier' => $contentStreamIdentifier + 'contentStreamId' => $contentStreamId ]); } @@ -331,13 +331,13 @@ private function getDatabaseConnection(): Connection } private function updateContentStreamVersion( - EmbedsContentStreamAndNodeAggregateIdentifier $eventInstance, + EmbedsContentStreamAndNodeAggregateId $eventInstance, EventEnvelope $eventEnvelope ): void { $this->getDatabaseConnection()->update($this->tableName, [ 'version' => self::extractVersion($eventEnvelope), ], [ - 'contentStreamIdentifier' => $eventInstance->getContentStreamIdentifier() + 'contentStreamId' => $eventInstance->getContentStreamId() ]); } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjectionFactory.php b/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjectionFactory.php index 64168a8bd49..30b48d79cd4 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjectionFactory.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjectionFactory.php @@ -47,7 +47,7 @@ public function build( $this->dbalClient, sprintf( 'cr_%s_p_%s', - $projectionFactoryDependencies->contentRepositoryIdentifier, + $projectionFactoryDependencies->contentRepositoryId, $projectionShortName ), ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenState.php b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenState.php index dc3d1f650f1..48d5974df38 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenState.php +++ b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenState.php @@ -16,8 +16,8 @@ use Doctrine\DBAL\Connection; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * Node Hidden State Read Model. diff --git a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateFinder.php b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateFinder.php index 8d8ff509306..fc3cfa34b5c 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateFinder.php +++ b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateFinder.php @@ -17,8 +17,8 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ProjectionStateInterface; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Finder for hidden states @@ -34,22 +34,22 @@ public function __construct( } public function findHiddenState( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, DimensionSpacePoint $dimensionSpacePoint, - NodeAggregateIdentifier $nodeAggregateIdentifier + NodeAggregateId $nodeAggregateId ): NodeHiddenState { $connection = $this->client->getConnection(); $result = $connection->executeQuery( ' SELECT * FROM ' . $this->tableName . ' - WHERE contentstreamidentifier = :contentStreamIdentifier + WHERE contentstreamid = :contentStreamId AND dimensionspacepointhash = :dimensionSpacePointHash - AND nodeaggregateidentifier = :nodeAggregateIdentifier + AND nodeaggregateid = :nodeAggregateId ', [ - 'contentStreamIdentifier' => (string)$contentStreamIdentifier, + 'contentStreamId' => (string)$contentStreamId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, - 'nodeAggregateIdentifier' => (string)$nodeAggregateIdentifier, + 'nodeAggregateId' => (string)$nodeAggregateId, ] )->fetch(); diff --git a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjection.php b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjection.php index 7b3d075394d..f56de3ef13c 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjection.php +++ b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjection.php @@ -72,10 +72,10 @@ private function setupTables(): void } $schema = new Schema(); $contentStreamTable = $schema->createTable($this->tableName); - $contentStreamTable->addColumn('contentstreamidentifier', Types::STRING) + $contentStreamTable->addColumn('contentstreamid', Types::STRING) ->setLength(255) ->setNotnull(true); - $contentStreamTable->addColumn('nodeaggregateidentifier', Types::STRING) + $contentStreamTable->addColumn('nodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(true); $contentStreamTable->addColumn('dimensionspacepointhash', Types::STRING) @@ -88,7 +88,7 @@ private function setupTables(): void ->setNotnull(false); $contentStreamTable->setPrimaryKey( - ['contentstreamidentifier', 'nodeaggregateidentifier', 'dimensionspacepointhash'] + ['contentstreamid', 'nodeaggregateid', 'dimensionspacepointhash'] ); $schemaDiff = (new Comparator())->compare($schemaManager->createSchema(), $schema); @@ -161,14 +161,14 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): foreach ($event->affectedDimensionSpacePoints as $dimensionSpacePoint) { if ( !$this->getState()->findHiddenState( - $event->contentStreamIdentifier, + $event->contentStreamId, $dimensionSpacePoint, - $event->nodeAggregateIdentifier + $event->nodeAggregateId )->isHidden ) { $nodeHiddenState = new NodeHiddenStateRecord( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $dimensionSpacePoint, true ); @@ -185,13 +185,13 @@ private function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): vo DELETE FROM ' . $this->tableName . ' WHERE - contentstreamidentifier = :contentStreamIdentifier - AND nodeaggregateidentifier = :nodeAggregateIdentifier + contentstreamid = :contentStreamId + AND nodeaggregateid = :nodeAggregateId AND dimensionspacepointhash IN (:dimensionSpacePointHashes) ', [ - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$event->nodeAggregateIdentifier, + 'contentStreamId' => (string)$event->contentStreamId, + 'nodeAggregateId' => (string)$event->nodeAggregateId, 'dimensionSpacePointHashes' => $event->affectedDimensionSpacePoints->getPointHashes() ], [ @@ -205,23 +205,23 @@ private function whenContentStreamWasForked(ContentStreamWasForked $event): void $this->transactional(function () use ($event) { $this->getDatabaseConnection()->executeUpdate(' INSERT INTO ' . $this->tableName . ' ( - contentstreamidentifier, - nodeaggregateidentifier, + contentstreamid, + nodeaggregateid, dimensionspacepoint, dimensionspacepointhash, hidden ) SELECT - "' . (string)$event->newContentStreamIdentifier . '" AS contentstreamidentifier, - nodeaggregateidentifier, + "' . (string)$event->newContentStreamId . '" AS contentstreamid, + nodeaggregateid, dimensionspacepoint, dimensionspacepointhash, hidden FROM ' . $this->tableName . ' h - WHERE h.contentstreamidentifier = :sourceContentStreamIdentifier + WHERE h.contentstreamid = :sourceContentStreamId ', [ - 'sourceContentStreamIdentifier' => (string)$event->sourceContentStreamIdentifier + 'sourceContentStreamId' => (string)$event->sourceContentStreamId ]); }); } @@ -237,13 +237,13 @@ private function whenDimensionSpacePointWasMoved(DimensionSpacePointWasMoved $ev nhs.dimensionspacepointhash = :newDimensionSpacePointHash WHERE nhs.dimensionspacepointhash = :originalDimensionSpacePointHash - AND nhs.contentstreamidentifier = :contentStreamIdentifier + AND nhs.contentstreamid = :contentStreamId ', [ 'originalDimensionSpacePointHash' => $event->source->hash, 'newDimensionSpacePointHash' => $event->target->hash, 'newDimensionSpacePoint' => json_encode($event->target->jsonSerialize()), - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'contentStreamId' => (string)$event->contentStreamId ] ); }); diff --git a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjectionFactory.php b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjectionFactory.php index 50383aad5f0..7f4b31a8715 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjectionFactory.php +++ b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjectionFactory.php @@ -48,7 +48,7 @@ public function build( $this->dbalClient, sprintf( 'cr_%s_p_%s', - $projectionFactoryDependencies->contentRepositoryIdentifier, + $projectionFactoryDependencies->contentRepositoryId, $projectionShortName ), ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateRecord.php b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateRecord.php index 1f914f2d949..dbd798e0a3c 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateRecord.php +++ b/Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateRecord.php @@ -16,8 +16,8 @@ use Doctrine\DBAL\Connection; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * Node Hidden State database record @@ -31,37 +31,37 @@ */ class NodeHiddenStateRecord { - private ?ContentStreamIdentifier $contentStreamIdentifier; + private ?ContentStreamId $contentStreamId; - private ?NodeAggregateIdentifier $nodeAggregateIdentifier; + private ?NodeAggregateId $nodeAggregateId; private ?DimensionSpacePoint $dimensionSpacePoint; private bool $hidden; public function __construct( - ?ContentStreamIdentifier $contentStreamIdentifier, - ?NodeAggregateIdentifier $nodeAggregateIdentifier, + ?ContentStreamId $contentStreamId, + ?NodeAggregateId $nodeAggregateId, ?DimensionSpacePoint $dimensionSpacePoint, bool $hidden ) { - $this->contentStreamIdentifier = $contentStreamIdentifier; - $this->nodeAggregateIdentifier = $nodeAggregateIdentifier; + $this->contentStreamId = $contentStreamId; + $this->nodeAggregateId = $nodeAggregateId; $this->dimensionSpacePoint = $dimensionSpacePoint; $this->hidden = $hidden; } public function addToDatabase(Connection $databaseConnection, string $tableName): void { - if (is_null($this->contentStreamIdentifier)) { + if (is_null($this->contentStreamId)) { throw new \BadMethodCallException( - 'Cannot add NodeHiddenState to database without a contentStreamIdentifier', + 'Cannot add NodeHiddenState to database without a contentStreamId', 1645383933 ); } - if (is_null($this->nodeAggregateIdentifier)) { + if (is_null($this->nodeAggregateId)) { throw new \BadMethodCallException( - 'Cannot add NodeHiddenState to database without a nodeAggregateIdentifier', + 'Cannot add NodeHiddenState to database without a nodeAggregateId', 1645383950 ); } @@ -72,8 +72,8 @@ public function addToDatabase(Connection $databaseConnection, string $tableName) ); } $databaseConnection->insert($tableName, [ - 'contentStreamIdentifier' => (string)$this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$this->nodeAggregateIdentifier, + 'contentStreamId' => (string)$this->contentStreamId, + 'nodeAggregateId' => (string)$this->nodeAggregateId, 'dimensionSpacePoint' => json_encode($this->dimensionSpacePoint), 'dimensionSpacePointHash' => $this->dimensionSpacePoint->hash, 'hidden' => (int)$this->hidden, diff --git a/Neos.ContentRepository.Core/Classes/Projection/Workspace/Workspace.php b/Neos.ContentRepository.Core/Classes/Projection/Workspace/Workspace.php index bb927bf9277..4068c487a0d 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/Workspace/Workspace.php +++ b/Neos.ContentRepository.Core/Classes/Projection/Workspace/Workspace.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\Projection\Workspace; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -34,7 +34,7 @@ public function __construct( public readonly ?WorkspaceName $baseWorkspaceName, public readonly ?WorkspaceTitle $workspaceTitle, public readonly WorkspaceDescription $workspaceDescription, - public readonly ContentStreamIdentifier $currentContentStreamIdentifier, + public readonly ContentStreamId $currentContentStreamId, public readonly WorkspaceStatus $status, public readonly ?string $workspaceOwner ) { diff --git a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceFinder.php b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceFinder.php index 2161f95cd43..e68268ccd08 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceFinder.php +++ b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceFinder.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ProjectionStateInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -63,10 +63,10 @@ public function findOneByName(WorkspaceName $name): ?Workspace return $workspace; } - public function findOneByCurrentContentStreamIdentifier( - ContentStreamIdentifier $contentStreamIdentifier + public function findOneByCurrentContentStreamId( + ContentStreamId $contentStreamId ): ?Workspace { - $workspace = $this->workspaceRuntimeCache->getByCurrentContentStreamIdentifier($contentStreamIdentifier); + $workspace = $this->workspaceRuntimeCache->getByCurrentContentStreamId($contentStreamId); if ($workspace !== null) { return $workspace; } @@ -75,10 +75,10 @@ public function findOneByCurrentContentStreamIdentifier( $workspaceRow = $connection->executeQuery( ' SELECT * FROM ' . $this->tableName . ' - WHERE currentContentStreamIdentifier = :currentContentStreamIdentifier + WHERE currentContentStreamId = :currentContentStreamId ', [ - ':currentContentStreamIdentifier' => (string)$contentStreamIdentifier + ':currentContentStreamId' => (string)$contentStreamId ] )->fetchAssociative(); @@ -223,7 +223,7 @@ private function createWorkspaceFromDatabaseRow(array $row): Workspace !empty($row['baseworkspacename']) ? WorkspaceName::fromString($row['baseworkspacename']) : null, !empty($row['workspacetitle']) ? WorkspaceTitle::fromString($row['workspacetitle']) : null, WorkspaceDescription::fromString($row['workspacedescription']), - ContentStreamIdentifier::fromString($row['currentcontentstreamidentifier']), + ContentStreamId::fromString($row['currentcontentstreamid']), WorkspaceStatus::from($row['status']), $row['workspaceowner'] ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjection.php b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjection.php index 2dd73eeacb4..7078d2e0a6a 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjection.php +++ b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjection.php @@ -24,7 +24,7 @@ use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ProjectionInterface; use Neos\ContentRepository\Core\Projection\WithMarkStaleInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Event\RootWorkspaceWasCreated; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Event\WorkspaceRebaseFailed; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Event\WorkspaceWasCreated; @@ -99,7 +99,7 @@ private function setupTables(): void $workspaceTable->addColumn('workspaceowner', Types::STRING) ->setLength(255) ->setNotnull(false); - $workspaceTable->addColumn('currentcontentstreamidentifier', Types::STRING) + $workspaceTable->addColumn('currentcontentstreamid', Types::STRING) ->setLength(255) ->setNotnull(false); $workspaceTable->addColumn('status', Types::STRING) @@ -201,7 +201,7 @@ private function whenWorkspaceWasCreated(WorkspaceWasCreated $event): void 'workspaceTitle' => $event->workspaceTitle, 'workspaceDescription' => $event->workspaceDescription, 'workspaceOwner' => $event->workspaceOwner, - 'currentContentStreamIdentifier' => $event->newContentStreamIdentifier, + 'currentContentStreamId' => $event->newContentStreamId, 'status' => WorkspaceStatus::UP_TO_DATE->value ]); } @@ -212,20 +212,20 @@ private function whenRootWorkspaceWasCreated(RootWorkspaceWasCreated $event): vo 'workspaceName' => $event->workspaceName, 'workspaceTitle' => $event->workspaceTitle, 'workspaceDescription' => $event->workspaceDescription, - 'currentContentStreamIdentifier' => $event->newContentStreamIdentifier, + 'currentContentStreamId' => $event->newContentStreamId, 'status' => WorkspaceStatus::UP_TO_DATE->value ]); } private function whenWorkspaceWasDiscarded(WorkspaceWasDiscarded $event): void { - $this->updateContentStreamIdentifier($event->newContentStreamIdentifier, $event->workspaceName); + $this->updateContentStreamId($event->newContentStreamId, $event->workspaceName); $this->markDependentWorkspacesAsOutdated($event->workspaceName); } private function whenWorkspaceWasPartiallyDiscarded(WorkspaceWasPartiallyDiscarded $event): void { - $this->updateContentStreamIdentifier($event->newContentStreamIdentifier, $event->workspaceName); + $this->updateContentStreamId($event->newContentStreamId, $event->workspaceName); $this->markDependentWorkspacesAsOutdated($event->workspaceName); } @@ -233,8 +233,8 @@ private function whenWorkspaceWasPartiallyPublished(WorkspaceWasPartiallyPublish { // TODO: How do we test this method? // It's hard to design a BDD testcase failing if this method is commented out... - $this->updateContentStreamIdentifier( - $event->newSourceContentStreamIdentifier, + $this->updateContentStreamId( + $event->newSourceContentStreamId, $event->sourceWorkspaceName ); @@ -250,8 +250,8 @@ private function whenWorkspaceWasPublished(WorkspaceWasPublished $event): void { // TODO: How do we test this method? // It's hard to design a BDD testcase failing if this method is commented out... - $this->updateContentStreamIdentifier( - $event->newSourceContentStreamIdentifier, + $this->updateContentStreamId( + $event->newSourceContentStreamId, $event->sourceWorkspaceName ); @@ -265,7 +265,7 @@ private function whenWorkspaceWasPublished(WorkspaceWasPublished $event): void private function whenWorkspaceWasRebased(WorkspaceWasRebased $event): void { - $this->updateContentStreamIdentifier($event->newContentStreamIdentifier, $event->workspaceName); + $this->updateContentStreamId($event->newContentStreamId, $event->workspaceName); $this->markDependentWorkspacesAsOutdated($event->workspaceName); // When the rebase is successful, we can set the status of the workspace back to UP_TO_DATE. @@ -277,12 +277,12 @@ private function whenWorkspaceRebaseFailed(WorkspaceRebaseFailed $event): void $this->markWorkspaceAsOutdatedConflict($event->workspaceName); } - private function updateContentStreamIdentifier( - ContentStreamIdentifier $contentStreamIdentifier, + private function updateContentStreamId( + ContentStreamId $contentStreamId, WorkspaceName $workspaceName ): void { $this->getDatabaseConnection()->update($this->tableName, [ - 'currentContentStreamIdentifier' => $contentStreamIdentifier + 'currentContentStreamId' => $contentStreamId ], [ 'workspaceName' => $workspaceName ]); diff --git a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjectionFactory.php b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjectionFactory.php index 1bc2fb951dd..0babe13f3eb 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjectionFactory.php +++ b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjectionFactory.php @@ -47,7 +47,7 @@ public function build( $this->dbalClient, sprintf( 'cr_%s_p_%s', - $projectionFactoryDependencies->contentRepositoryIdentifier, + $projectionFactoryDependencies->contentRepositoryId, $projectionShortName ), ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceRuntimeCache.php b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceRuntimeCache.php index cee840fd580..7dd1393d86b 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceRuntimeCache.php +++ b/Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceRuntimeCache.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\Projection\Workspace; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -34,7 +34,7 @@ final class WorkspaceRuntimeCache /** * @var array */ - private array $cachedWorkspacesByContentStreamIdentifier = []; + private array $cachedWorkspacesByContentStreamId = []; /** * @return void @@ -43,7 +43,7 @@ public function disableCache(): void { $this->cacheEnabled = false; $this->cachedWorkspacesByName = []; - $this->cachedWorkspacesByContentStreamIdentifier = []; + $this->cachedWorkspacesByContentStreamId = []; } public function getWorkspaceByName(WorkspaceName $name): ?Workspace @@ -58,19 +58,19 @@ public function setWorkspace(Workspace $workspace): void { if ($this->cacheEnabled === true) { $this->cachedWorkspacesByName[$workspace->workspaceName->name] = $workspace; - $this->cachedWorkspacesByContentStreamIdentifier[ - $workspace->currentContentStreamIdentifier->getValue() + $this->cachedWorkspacesByContentStreamId[ + $workspace->currentContentStreamId->getValue() ] = $workspace; } } - public function getByCurrentContentStreamIdentifier(ContentStreamIdentifier $contentStreamIdentifier): ?Workspace + public function getByCurrentContentStreamId(ContentStreamId $contentStreamId): ?Workspace { if ( $this->cacheEnabled === true - && isset($this->cachedWorkspacesByContentStreamIdentifier[(string)$contentStreamIdentifier]) + && isset($this->cachedWorkspacesByContentStreamId[(string)$contentStreamId]) ) { - return $this->cachedWorkspacesByContentStreamIdentifier[(string)$contentStreamIdentifier]; + return $this->cachedWorkspacesByContentStreamId[(string)$contentStreamId]; } return null; } diff --git a/Neos.ContentRepository.Core/Classes/Service/ContentRepositoryBootstrapper.php b/Neos.ContentRepository.Core/Classes/Service/ContentRepositoryBootstrapper.php index 31eff6d7870..9178171851a 100644 --- a/Neos.ContentRepository.Core/Classes/Service/ContentRepositoryBootstrapper.php +++ b/Neos.ContentRepository.Core/Classes/Service/ContentRepositoryBootstrapper.php @@ -8,10 +8,10 @@ use Neos\ContentRepository\Core\Feature\RootNodeCreation\Command\CreateRootNodeAggregateWithNode; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateRootWorkspace; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -35,52 +35,52 @@ public static function create(ContentRepository $contentRepository): self } /** - * Retrieve the Content Stream Identifier of the "live" workspace. + * Retrieve the Content Stream ID of the "live" workspace. * If the "live" workspace does not exist yet, it will be created */ - public function getOrCreateLiveContentStream(): ContentStreamIdentifier + public function getOrCreateLiveContentStream(): ContentStreamId { $liveWorkspace = $this->contentRepository->getWorkspaceFinder()->findOneByName(WorkspaceName::forLive()); if ($liveWorkspace instanceof Workspace) { - return $liveWorkspace->currentContentStreamIdentifier; + return $liveWorkspace->currentContentStreamId; } - $liveContentStreamIdentifier = ContentStreamIdentifier::create(); + $liveContentStreamId = ContentStreamId::create(); $this->contentRepository->handle( new CreateRootWorkspace( WorkspaceName::forLive(), WorkspaceTitle::fromString('Live'), WorkspaceDescription::fromString('Public live workspace'), - UserIdentifier::forSystemUser(), - $liveContentStreamIdentifier + UserId::forSystemUser(), + $liveContentStreamId ) )->block(); - return $liveContentStreamIdentifier; + return $liveContentStreamId; } /** - * Retrieve the root Node Aggregate Identifier for the specified $contentStreamIdentifier + * Retrieve the root Node Aggregate ID for the specified $contentStreamId * If no root node of the specified $rootNodeTypeName exist, it will be created */ public function getOrCreateRootNodeAggregate( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamId, NodeTypeName $rootNodeTypeName - ): NodeAggregateIdentifier { + ): NodeAggregateId { try { return $this->contentRepository->getContentGraph()->findRootNodeAggregateByType( - $contentStreamIdentifier, + $contentStreamId, $rootNodeTypeName - )->nodeAggregateIdentifier; + )->nodeAggregateId; // TODO make this case more explicit } catch (\Exception $exception) { - $rootNodeAggregateIdentifier = NodeAggregateIdentifier::create(); + $rootNodeAggregateId = NodeAggregateId::create(); $this->contentRepository->handle(new CreateRootNodeAggregateWithNode( - $contentStreamIdentifier, - $rootNodeAggregateIdentifier, + $contentStreamId, + $rootNodeAggregateId, $rootNodeTypeName, - UserIdentifier::forSystemUser() + UserId::forSystemUser() ))->block(); - return $rootNodeAggregateIdentifier; + return $rootNodeAggregateId; } } } diff --git a/Neos.ContentRepository.Core/Classes/Service/ContentStreamPruner.php b/Neos.ContentRepository.Core/Classes/Service/ContentStreamPruner.php index ed95f4c4ca1..b07cc1eb25f 100644 --- a/Neos.ContentRepository.Core/Classes/Service/ContentStreamPruner.php +++ b/Neos.ContentRepository.Core/Classes/Service/ContentStreamPruner.php @@ -8,8 +8,8 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\ContentStreamRemoval\Command\RemoveContentStream; use Neos\EventStore\EventStoreInterface; @@ -35,7 +35,7 @@ public function __construct( * To remove the deleted Content Streams, * call {@see ContentStreamPruner::pruneRemovedFromEventStream()} afterwards. * - * @return iterable the identifiers of the removed content streams + * @return iterable the identifiers of the removed content streams */ public function prune(): iterable { @@ -45,7 +45,7 @@ public function prune(): iterable $this->lastCommandResult = $this->contentRepository->handle( new RemoveContentStream( $contentStream, - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); } @@ -62,7 +62,7 @@ public function prune(): iterable * * - Otherwise, we cannot replay the other content streams correctly (if the base content streams are missing). * - * @return iterable the identifiers of the removed content streams + * @return iterable the identifiers of the removed content streams */ public function pruneRemovedFromEventStream(): iterable { @@ -70,7 +70,7 @@ public function pruneRemovedFromEventStream(): iterable ->findUnusedAndRemovedContentStreams(); foreach ($removedContentStreams as $removedContentStream) { - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($removedContentStream) + $streamName = ContentStreamEventStreamName::fromContentStreamId($removedContentStream) ->getEventStreamName(); $this->eventStore->deleteStream($streamName); } diff --git a/Neos.ContentRepository.Core/Classes/Service/WorkspaceMaintenanceService.php b/Neos.ContentRepository.Core/Classes/Service/WorkspaceMaintenanceService.php index 4015ec90da9..cd63232d46c 100644 --- a/Neos.ContentRepository.Core/Classes/Service/WorkspaceMaintenanceService.php +++ b/Neos.ContentRepository.Core/Classes/Service/WorkspaceMaintenanceService.php @@ -8,7 +8,7 @@ use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Command\RebaseWorkspace; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * @api @@ -37,7 +37,7 @@ public function rebaseOutdatedWorkspaces(): array /* @var Workspace $workspace */ $this->contentRepository->handle(RebaseWorkspace::create( $workspace->workspaceName, - UserIdentifier::forSystemUser() + UserId::forSystemUser() ))->block(); } diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint.php b/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint.php index 2bfbaf196de..d2d975d6667 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\SharedModel\Exception; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * The exception to be thrown if a node aggregate does currently not cover a given dimension space point @@ -26,11 +26,11 @@ final class NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint extends \DomainException { public static function butWasSupposedTo( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, DimensionSpacePoint $coveredDimensionSpacePoint ): self { return new self( - 'Node aggregate "' . $nodeAggregateIdentifier + 'Node aggregate "' . $nodeAggregateId . '" does currently not cover dimension space point ' . $coveredDimensionSpacePoint, 1554902892 ); diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet.php b/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet.php index fc402ede20d..246d8debf68 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\SharedModel\Exception; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; /** * The exception to be thrown if a node aggregate does currently not cover the given dimension space point set @@ -26,12 +26,12 @@ final class NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet extends \DomainException { public static function butWasSupposedTo( - NodeAggregateIdentifier $identifier, + NodeAggregateId $nodeAggregateId, DimensionSpacePointSet $expectedCoveredDimensionSpacePointSet, DimensionSpacePointSet $actualDimensionSpacePointSet ): NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet { return new self( - 'Node aggregate "' . $identifier . '" does not cover expected dimension space point set ' + 'Node aggregate "' . $nodeAggregateId . '" does not cover expected dimension space point set ' . $expectedCoveredDimensionSpacePointSet . ' but ' . $actualDimensionSpacePointSet . '.', 1571134743 ); diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint.php b/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint.php index e273919b0f9..1d95ca22fb8 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\Core\SharedModel\Exception; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; /** @@ -26,11 +26,11 @@ final class NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint extends \DomainException { public static function butWasSupposedTo( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $occupiedDimensionSpacePoint ): self { return new self( - 'Node aggregate "' . $nodeAggregateIdentifier + 'Node aggregate "' . $nodeAggregateId . '" does currently not occupy dimension space point ' . $occupiedDimensionSpacePoint, 1554902613 ); diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIdentifier.php b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php similarity index 90% rename from Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIdentifier.php rename to Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php index d9a3d7e70c1..a95db287d8d 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIdentifier.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php @@ -17,11 +17,11 @@ use Neos\Flow\Utility\Algorithms; /** - * The NodeAggregateIdentifier supersedes the Node Identifier from Neos <= 9.x. + * The NodeAggregateId supersedes the Node Identifier from Neos <= 9.x. * * @api */ -final class NodeAggregateIdentifier implements \JsonSerializable, \Stringable +final class NodeAggregateId implements \JsonSerializable, \Stringable { /** * A preg pattern to match against node aggregate identifiers diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIdentifiers.php b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIdentifiers.php deleted file mode 100644 index fadcdeb5bf9..00000000000 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIdentifiers.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @api - */ -final class NodeAggregateIdentifiers implements \IteratorAggregate, \JsonSerializable -{ - /** - * @var array - */ - private array $nodeAggregateIdentifiers; - - /** - * @var \ArrayIterator - */ - private \ArrayIterator $iterator; - - private function __construct(NodeAggregateIdentifier ...$nodeAggregateIdentifiers) - { - /** @var array $nodeAggregateIdentifiers */ - $this->nodeAggregateIdentifiers = $nodeAggregateIdentifiers; - $this->iterator = new \ArrayIterator($nodeAggregateIdentifiers); - } - - public static function createEmpty(): self - { - return new self(...[]); - } - - - - public static function create(NodeAggregateIdentifier ...$nodeAggregateIdentifiers): self - { - return self::fromArray($nodeAggregateIdentifiers); - } - /** - * @param array $array - */ - public static function fromArray(array $array): self - { - $nodeAggregateIdentifiers = []; - foreach ($array as $serializedNodeAggregateIdentifier) { - if ($serializedNodeAggregateIdentifier instanceof NodeAggregateIdentifier) { - $nodeAggregateIdentifiers[(string)$serializedNodeAggregateIdentifier] - = $serializedNodeAggregateIdentifier; - } else { - $nodeAggregateIdentifiers[$serializedNodeAggregateIdentifier] - = NodeAggregateIdentifier::fromString($serializedNodeAggregateIdentifier); - } - } - - return new self(...$nodeAggregateIdentifiers); - } - - public static function fromJsonString(string $jsonString): self - { - return self::fromArray(\json_decode($jsonString, true)); - } - - /** - * @param Node[] $nodes - */ - public static function fromNodes(array $nodes): self - { - return self::fromArray( - array_map(fn(Node $node) => $node->nodeAggregateIdentifier, $nodes) - ); - } - - public function merge(self $other): self - { - return new self(...array_merge( - $this->nodeAggregateIdentifiers, - $other->getIterator()->getArrayCopy() - )); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - return $this->nodeAggregateIdentifiers; - } - - public function __toString(): string - { - return \json_encode($this, JSON_THROW_ON_ERROR); - } - - /** - * @return array - */ - public function toStringArray(): array - { - return array_keys($this->nodeAggregateIdentifiers); - } - - /** - * @return \ArrayIterator - */ - public function getIterator(): \ArrayIterator - { - return $this->iterator; - } -} diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIds.php b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIds.php new file mode 100644 index 00000000000..8baaa44dc14 --- /dev/null +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateIds.php @@ -0,0 +1,123 @@ + + * @api + */ +final class NodeAggregateIds implements \IteratorAggregate, \JsonSerializable +{ + /** + * @var array + */ + private array $nodeAggregateIds; + + /** + * @var \ArrayIterator + */ + private \ArrayIterator $iterator; + + private function __construct(NodeAggregateId ...$nodeAggregateIds) + { + /** @var array $nodeAggregateIds */ + $this->nodeAggregateIds = $nodeAggregateIds; + $this->iterator = new \ArrayIterator($nodeAggregateIds); + } + + public static function createEmpty(): self + { + return new self(...[]); + } + + + + public static function create(NodeAggregateId ...$nodeAggregateIds): self + { + return self::fromArray($nodeAggregateIds); + } + /** + * @param array $array + */ + public static function fromArray(array $array): self + { + $nodeAggregateIds = []; + foreach ($array as $serializedNodeAggregateId) { + if ($serializedNodeAggregateId instanceof NodeAggregateId) { + $nodeAggregateIds[(string)$serializedNodeAggregateId] = $serializedNodeAggregateId; + } else { + $nodeAggregateIds[$serializedNodeAggregateId] = NodeAggregateId::fromString($serializedNodeAggregateId); + } + } + + return new self(...$nodeAggregateIds); + } + + public static function fromJsonString(string $jsonString): self + { + return self::fromArray(\json_decode($jsonString, true)); + } + + /** + * @param Node[] $nodes + */ + public static function fromNodes(array $nodes): self + { + return self::fromArray( + array_map(fn(Node $node) => $node->nodeAggregateId, $nodes) + ); + } + + public function merge(self $other): self + { + return new self(...array_merge( + $this->nodeAggregateIds, + $other->getIterator()->getArrayCopy() + )); + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + return $this->nodeAggregateIds; + } + + public function __toString(): string + { + return \json_encode($this, JSON_THROW_ON_ERROR); + } + + /** + * @return array + */ + public function toStringArray(): array + { + return array_keys($this->nodeAggregateIds); + } + + /** + * @return \ArrayIterator + */ + public function getIterator(): \ArrayIterator + { + return $this->iterator; + } +} diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/User/UserIdentifier.php b/Neos.ContentRepository.Core/Classes/SharedModel/User/UserId.php similarity index 79% rename from Neos.ContentRepository.Core/Classes/SharedModel/User/UserIdentifier.php rename to Neos.ContentRepository.Core/Classes/SharedModel/User/UserId.php index 00547acd186..5cc74d8a47c 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/User/UserIdentifier.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/User/UserId.php @@ -19,9 +19,9 @@ /** * @api */ -final class UserIdentifier implements \JsonSerializable, \Stringable +final class UserId implements \JsonSerializable, \Stringable { - public const SYSTEM_USER_IDENTIFIER = 'system'; + public const SYSTEM_USER_ID = 'system'; /** * @var array @@ -44,11 +44,11 @@ public static function create(): self } /** - * Creates a special user identifier which refers to the virtual "system" user. + * Creates a special user ID which refers to the virtual "system" user. */ public static function forSystemUser(): self { - return self::instance(self::SYSTEM_USER_IDENTIFIER); + return self::instance(self::SYSTEM_USER_ID); } public static function fromString(string $value): self @@ -58,7 +58,7 @@ public static function fromString(string $value): self public function isSystemUser(): bool { - return $this->value === self::SYSTEM_USER_IDENTIFIER; + return $this->value === self::SYSTEM_USER_ID; } public function jsonSerialize(): string diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Workspace/ContentStreamIdentifier.php b/Neos.ContentRepository.Core/Classes/SharedModel/Workspace/ContentStreamId.php similarity index 89% rename from Neos.ContentRepository.Core/Classes/SharedModel/Workspace/ContentStreamIdentifier.php rename to Neos.ContentRepository.Core/Classes/SharedModel/Workspace/ContentStreamId.php index 1534edc2584..9eb87fd00ed 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Workspace/ContentStreamIdentifier.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Workspace/ContentStreamId.php @@ -17,12 +17,12 @@ use Neos\Flow\Utility\Algorithms; /** - * The ContentStreamIdentifier is the identifier for a Content Stream, which is + * The ContentStreamId is the identifier for a Content Stream, which is * a central concept in the Event-Sourced CR introduced with Neos 5.0. * * @api */ -final class ContentStreamIdentifier implements \JsonSerializable, \Stringable +final class ContentStreamId implements \JsonSerializable, \Stringable { /** * @var array diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentSubgraphTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentSubgraphTrait.php index 18a909e161e..0ebcc41e9d2 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentSubgraphTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentSubgraphTrait.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\Core\Tests\Behavior\Features\Bootstrap; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Projection\Workspace\WorkspaceFinder; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; @@ -29,7 +29,7 @@ */ trait CurrentSubgraphTrait { - protected ?ContentStreamIdentifier $contentStreamIdentifier = null; + protected ?ContentStreamId $contentStreamId = null; protected ?DimensionSpacePoint $dimensionSpacePoint = null; @@ -41,11 +41,11 @@ abstract protected function getWorkspaceFinder(): WorkspaceFinder; /** * @Given /^I am in content stream "([^"]*)"$/ - * @param string $contentStreamIdentifier + * @param string $contentStreamId */ - public function iAmInContentStream(string $contentStreamIdentifier): void + public function iAmInContentStream(string $contentStreamId): void { - $this->contentStreamIdentifier = ContentStreamIdentifier::fromString($contentStreamIdentifier); + $this->contentStreamId = ContentStreamId::fromString($contentStreamId); } /** * @Given /^I am in dimension space point (.*)$/ @@ -58,12 +58,12 @@ public function iAmInDimensionSpacePoint(string $dimensionSpacePoint): void /** * @Given /^I am in content stream "([^"]*)" and dimension space point (.*)$/ - * @param string $contentStreamIdentifier + * @param string $contentStreamId * @param string $dimensionSpacePoint */ - public function iAmInContentStreamAndDimensionSpacePoint(string $contentStreamIdentifier, string $dimensionSpacePoint) + public function iAmInContentStreamAndDimensionSpacePoint(string $contentStreamId, string $dimensionSpacePoint) { - $this->iAmInContentStream($contentStreamIdentifier); + $this->iAmInContentStream($contentStreamId); $this->iAmInDimensionSpacePoint($dimensionSpacePoint); } @@ -78,7 +78,7 @@ public function iAmInTheActiveContentStreamOfWorkspaceAndDimensionSpacePoint(str if ($workspace === null) { throw new \Exception(sprintf('Workspace "%s" does not exist, projection not yet up to date?', $workspaceName), 1548149355); } - $this->contentStreamIdentifier = $workspace->currentContentStreamIdentifier; + $this->contentStreamId = $workspace->currentContentStreamId; $this->dimensionSpacePoint = DimensionSpacePoint::fromJsonString($dimensionSpacePoint); } @@ -107,9 +107,9 @@ public function iExpectTheSubgraphProjectionToConsistOfExactlyNodes(int $expecte } } - public function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier + public function getCurrentContentStreamId(): ?ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } public function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint @@ -128,7 +128,7 @@ protected function getCurrentSubgraphs(): ContentSubgraphs foreach ($this->getActiveContentGraphs() as $adapterName => $contentGraph) { assert($contentGraph instanceof ContentGraphInterface); $currentSubgraphs[$adapterName] = $contentGraph->getSubgraph( - $this->contentStreamIdentifier, + $this->contentStreamId, $this->dimensionSpacePoint, $this->visibilityConstraints ); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentUserTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentUserTrait.php index 82d16f5f732..2aed6121429 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentUserTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/CurrentUserTrait.php @@ -12,26 +12,26 @@ * source code. */ -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * The feature trait to test projected nodes */ trait CurrentUserTrait { - protected ?UserIdentifier $currentUserIdentifier = null; + protected ?UserId $currentUserId = null; /** * @Given /^I am user identified by "([^"]*)"$/ - * @param string $userIdentifier + * @param string $userId */ - public function iAmUserIdentifiedBy(string $userIdentifier): void + public function iAmUserIdentifiedBy(string $userId): void { - $this->currentUserIdentifier = UserIdentifier::fromString($userIdentifier); + $this->currentUserId = UserId::fromString($userId); } - public function getCurrentUserIdentifier(): ?UserIdentifier + public function getCurrentUserId(): ?UserId { - return $this->currentUserIdentifier; + return $this->currentUserId; } } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/EventSourcedTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/EventSourcedTrait.php index 1390da117bc..8ea2fc81bb6 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/EventSourcedTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/EventSourcedTrait.php @@ -35,8 +35,9 @@ use Neos\ContentRepository\BehavioralTests\ProjectionRaceConditionTester\RedisInterleavingLogger; use Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection\HypergraphProjection; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite; +use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface; @@ -46,14 +47,14 @@ use Neos\ContentRepository\Security\Service\AuthorizationService; use Neos\ContentRepository\Core\Service\ContentStreamPruner; use Neos\ContentRepository\Core\Service\ContentStreamPrunerFactory; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepositoryRegistry\Factory\ProjectionCatchUpTrigger\CatchUpTriggerWithSynchronousOption; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\Tests\Behavior\Features\Bootstrap\Features\ContentStreamForking; use Neos\ContentRepository\Core\Tests\Behavior\Features\Bootstrap\Features\NodeCopying; @@ -112,9 +113,9 @@ trait EventSourcedTrait protected ContentGraphs $activeContentGraphs; - protected ?NodeAggregateIdentifier $rootNodeAggregateIdentifier; + protected ?NodeAggregateId $rootNodeAggregateId; - private ContentRepositoryIdentifier $contentRepositoryIdentifier; + private ContentRepositoryId $contentRepositoryId; private ContentRepositoryRegistry $contentRepositoryRegistry; private ContentRepository $contentRepository; private ContentRepositoryInternals $contentRepositoryInternals; @@ -122,9 +123,9 @@ trait EventSourcedTrait abstract protected function getObjectManager(): ObjectManagerInterface; - protected function getContentRepositoryIdentifier(): ContentRepositoryIdentifier + protected function getContentRepositoryId(): ContentRepositoryId { - return $this->contentRepositoryIdentifier; + return $this->contentRepositoryId; } protected function getContentRepositoryRegistry(): ContentRepositoryRegistry @@ -172,7 +173,7 @@ protected function setupEventSourcedTrait(bool $alwaysRunCrSetup = false) { $this->alwaysRunContentRepositorySetup = $alwaysRunCrSetup; $this->nodeAuthorizationService = $this->getObjectManager()->get(AuthorizationService::class); - $this->contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString('default'); + $this->contentRepositoryId = ContentRepositoryId::fromString('default'); if (getenv('CATCHUPTRIGGER_ENABLE_SYNCHRONOUS_OPTION')) { CatchUpTriggerWithSynchronousOption::enableSynchonityForSpeedingUpTesting(); @@ -243,13 +244,13 @@ private function initCleanContentRepository(array $adapterKeys): void $this->getObjectManager() ); - $this->contentRepository = $this->contentRepositoryRegistry->get($this->contentRepositoryIdentifier); + $this->contentRepository = $this->contentRepositoryRegistry->get($this->contentRepositoryId); // Big performance optimization: only run the setup once - DRAMATICALLY reduces test time if ($this->alwaysRunContentRepositorySetup || !self::$wasContentRepositorySetupCalled) { $this->contentRepository->setUp(); self::$wasContentRepositorySetupCalled = true; } - $this->contentRepositoryInternals = $this->contentRepositoryRegistry->getService($this->contentRepositoryIdentifier, new ContentRepositoryInternalsFactory()); + $this->contentRepositoryInternals = $this->contentRepositoryRegistry->getService($this->contentRepositoryId, new ContentRepositoryInternalsFactory()); $availableContentGraphs = []; $availableContentGraphs['DoctrineDBAL'] = $this->contentRepository->getContentGraph(); @@ -292,10 +293,10 @@ public function beforeEventSourcedScenarioDispatcher(BeforeScenarioScope $scope) $this->visibilityConstraints = VisibilityConstraints::frontend(); $this->dimensionSpacePoint = null; - $this->rootNodeAggregateIdentifier = null; - $this->contentStreamIdentifier = null; + $this->rootNodeAggregateId = null; + $this->contentStreamId = null; $this->currentNodeAggregates = null; - $this->currentUserIdentifier = null; + $this->currentUserId = null; $this->currentNodes = null; $connection = $this->objectManager->get(DbalClientInterface::class)->getConnection(); @@ -342,7 +343,7 @@ public function beforeEventSourcedScenarioDispatcher(BeforeScenarioScope $scope) * Catch Up process and the testcase reset. */ - $eventTableName = sprintf('cr_%s_events', $this->contentRepositoryIdentifier); + $eventTableName = sprintf('cr_%s_events', $this->contentRepositoryId); $connection->executeStatement('TRUNCATE ' . $eventTableName); // TODO: WORKAROUND: UGLY AS HELL CODE: Projection Reset may fail because the lock cannot be acquired, so we @@ -416,14 +417,14 @@ protected function readPayloadTable(TableNode $payloadTable): array /** * called by {@see readPayloadTable()} above, from RebasingAutoCreatedChildNodesWorks.feature - * @return NodeAggregateIdentifier + * @return NodeAggregateId */ - protected function currentNodeAggregateIdentifier(): NodeAggregateIdentifier + protected function currentNodeAggregateId(): NodeAggregateId { $currentNodes = $this->currentNodes->getIterator()->getArrayCopy(); $firstNode = reset($currentNodes); assert($firstNode instanceof Node); - return $firstNode->nodeAggregateIdentifier; + return $firstNode->nodeAggregateId; } protected function deserializeProperties(array $properties): PropertyValuesToWrite @@ -475,8 +476,8 @@ public function workspacesPointToDifferentContentStreams(string $rawWorkspaceNam Assert::assertInstanceOf(Workspace::class, $workspaceB, 'Workspace "' . $rawWorkspaceNameB . '" does not exist.'); if ($workspaceA && $workspaceB) { Assert::assertNotEquals( - $workspaceA->currentContentStreamIdentifier->getValue(), - $workspaceB->currentContentStreamIdentifier->getValue(), + $workspaceA->currentContentStreamId->getValue(), + $workspaceB->currentContentStreamId->getValue(), 'Workspace "' . $rawWorkspaceNameA . '" points to the same content stream as "' . $rawWorkspaceNameB . '"' ); } @@ -485,11 +486,11 @@ public function workspacesPointToDifferentContentStreams(string $rawWorkspaceNam /** * @Then /^workspace "([^"]*)" does not point to content stream "([^"]*)"$/ */ - public function workspaceDoesNotPointToContentStream(string $rawWorkspaceName, string $rawContentStreamIdentifier) + public function workspaceDoesNotPointToContentStream(string $rawWorkspaceName, string $rawContentStreamId) { $workspace = $this->contentRepository->getWorkspaceFinder()->findOneByName(WorkspaceName::fromString($rawWorkspaceName)); - Assert::assertNotEquals($rawContentStreamIdentifier, (string)$workspace->currentContentStreamIdentifier); + Assert::assertNotEquals($rawContentStreamId, (string)$workspace->currentContentStreamId); } /** @@ -508,21 +509,21 @@ public function iExpectTheGraphProjectionToConsistOfExactlyNodes(int $expectedNu * @Then /^the subtree for node aggregate "([^"]*)" with node types "([^"]*)" and (\d+) levels deep should be:$/ */ public function theSubtreeForNodeAggregateWithNodeTypesAndLevelsDeepShouldBe( - string $serializedNodeAggregateIdentifier, + string $serializedNodeAggregateId, string $serializedNodeTypeConstraints, int $maximumLevels, TableNode $table ): void { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($serializedNodeAggregateIdentifier); + $nodeAggregateId = NodeAggregateId::fromString($serializedNodeAggregateId); $nodeTypeConstraints = NodeTypeConstraints::fromFilterString($serializedNodeTypeConstraints); foreach ($this->getActiveContentGraphs() as $adapterName => $contentGraph) { assert($contentGraph instanceof ContentGraphInterface); $expectedRows = $table->getHash(); $subtree = $contentGraph - ->getSubgraph($this->contentStreamIdentifier, $this->dimensionSpacePoint, $this->visibilityConstraints) - ->findSubtrees(NodeAggregateIdentifiers::fromArray([$nodeAggregateIdentifier]), $maximumLevels, $nodeTypeConstraints); + ->getSubgraph($this->contentStreamId, $this->dimensionSpacePoint, $this->visibilityConstraints) + ->findSubtrees(NodeAggregateIds::fromArray([$nodeAggregateId]), $maximumLevels, $nodeTypeConstraints); /** @var \Neos\ContentRepository\Core\Projection\ContentGraph\Subtree[] $flattenedSubtree */ $flattenedSubtree = []; @@ -534,9 +535,9 @@ public function theSubtreeForNodeAggregateWithNodeTypesAndLevelsDeepShouldBe( $expectedLevel = (int)$expectedRow['Level']; $actualLevel = $flattenedSubtree[$i]->level; Assert::assertSame($expectedLevel, $actualLevel, 'Level does not match in index ' . $i . ', expected: ' . $expectedLevel . ', actual: ' . $actualLevel . ' (adapter: ' . $adapterName . ')'); - $expectedNodeAggregateIdentifier = NodeAggregateIdentifier::fromString($expectedRow['NodeAggregateIdentifier']); - $actualNodeAggregateIdentifier = $flattenedSubtree[$i]->node->nodeAggregateIdentifier; - Assert::assertTrue($expectedNodeAggregateIdentifier->equals($actualNodeAggregateIdentifier), 'NodeAggregateIdentifier does not match in index ' . $i . ', expected: "' . $expectedNodeAggregateIdentifier . '", actual: "' . $actualNodeAggregateIdentifier . '" (adapter: ' . $adapterName . ')'); + $expectedNodeAggregateId = NodeAggregateId::fromString($expectedRow['nodeAggregateId']); + $actualNodeAggregateId = $flattenedSubtree[$i]->node->nodeAggregateId; + Assert::assertTrue($expectedNodeAggregateId->equals($actualNodeAggregateId), 'NodeAggregateId does not match in index ' . $i . ', expected: "' . $expectedNodeAggregateId . '", actual: "' . $actualNodeAggregateId . '" (adapter: ' . $adapterName . ')'); } } } @@ -578,22 +579,22 @@ public function getCurrentNodeAddresses(): array /** * @Given /^I get the node address for node aggregate "([^"]*)"(?:, remembering it as "([^"]*)")?$/ - * @param string $rawNodeAggregateIdentifier + * @param string $rawNodeAggregateId * @param string $alias */ - public function iGetTheNodeAddressForNodeAggregate(string $rawNodeAggregateIdentifier, $alias = 'DEFAULT') + public function iGetTheNodeAddressForNodeAggregate(string $rawNodeAggregateId, $alias = 'DEFAULT') { - $subgraph = $this->contentGraph->getSubgraph($this->contentStreamIdentifier, $this->dimensionSpacePoint, $this->visibilityConstraints); - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($rawNodeAggregateIdentifier); - $node = $subgraph->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier); - Assert::assertNotNull($node, 'Did not find a node with aggregate identifier "' . $nodeAggregateIdentifier . '"'); + $subgraph = $this->contentGraph->getSubgraph($this->contentStreamId, $this->dimensionSpacePoint, $this->visibilityConstraints); + $nodeAggregateId = NodeAggregateId::fromString($rawNodeAggregateId); + $node = $subgraph->findNodeByNodeAggregateId($nodeAggregateId); + Assert::assertNotNull($node, 'Did not find a node with aggregate id "' . $nodeAggregateId . '"'); $this->currentNodeAddresses[$alias] = new NodeAddress( - $this->contentStreamIdentifier, + $this->contentStreamId, $this->dimensionSpacePoint, - $nodeAggregateIdentifier, + $nodeAggregateId, $this->contentRepository->getWorkspaceFinder() - ->findOneByCurrentContentStreamIdentifier($this->contentStreamIdentifier) + ->findOneByCurrentContentStreamId($this->contentStreamId) ->workspaceName ); } @@ -606,19 +607,19 @@ public function iGetTheNodeAddressForNodeAggregate(string $rawNodeAggregateIdent */ public function iGetTheNodeAddressForTheNodeAtPath(string $serializedNodePath, $alias = 'DEFAULT') { - $subgraph = $this->contentGraph->getSubgraph($this->contentStreamIdentifier, $this->dimensionSpacePoint, $this->visibilityConstraints); - if (!$this->getRootNodeAggregateIdentifier()) { - throw new \Exception('ERROR: rootNodeAggregateIdentifier needed for running this step. You need to use "the event RootNodeAggregateWithNodeWasCreated was published with payload" to create a root node..'); + $subgraph = $this->contentGraph->getSubgraph($this->contentStreamId, $this->dimensionSpacePoint, $this->visibilityConstraints); + if (!$this->getRootNodeAggregateId()) { + throw new \Exception('ERROR: rootNodeAggregateId needed for running this step. You need to use "the event RootNodeAggregateWithNodeWasCreated was published with payload" to create a root node..'); } - $node = $subgraph->findNodeByPath(NodePath::fromString($serializedNodePath), $this->getRootNodeAggregateIdentifier()); + $node = $subgraph->findNodeByPath(NodePath::fromString($serializedNodePath), $this->getRootNodeAggregateId()); Assert::assertNotNull($node, 'Did not find a node at path "' . $serializedNodePath . '"'); $this->currentNodeAddresses[$alias] = new NodeAddress( - $this->contentStreamIdentifier, + $this->contentStreamId, $this->dimensionSpacePoint, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $this->contentRepository->getWorkspaceFinder() - ->findOneByCurrentContentStreamIdentifier($this->contentStreamIdentifier) + ->findOneByCurrentContentStreamId($this->contentStreamId) ->workspaceName ); } @@ -632,31 +633,32 @@ protected function getEventStore(): EventStoreInterface return $this->getContentRepositoryInternals()->eventStore; } - protected function getRootNodeAggregateIdentifier(): ?NodeAggregateIdentifier + protected function getRootNodeAggregateId(): ?NodeAggregateId { - if ($this->rootNodeAggregateIdentifier) { - return $this->rootNodeAggregateIdentifier; + if ($this->rootNodeAggregateId) { + return $this->rootNodeAggregateId; } $contentGraphs = $this->getActiveContentGraphs()->getIterator()->getArrayCopy(); $contentGraph = reset($contentGraphs); - $sitesNodeAggregate = $contentGraph->findRootNodeAggregateByType($this->contentStreamIdentifier, \Neos\ContentRepository\Core\NodeType\NodeTypeName::fromString('Neos.Neos:Sites')); + $sitesNodeAggregate = $contentGraph->findRootNodeAggregateByType($this->contentStreamId, \Neos\ContentRepository\Core\NodeType\NodeTypeName::fromString('Neos.Neos:Sites')); if ($sitesNodeAggregate) { - return $sitesNodeAggregate->getIdentifier(); + assert($sitesNodeAggregate instanceof NodeAggregate); + return $sitesNodeAggregate->nodeAggregateId; } return null; } /** - * @Then the content stream :contentStreamIdentifier has state :expectedState + * @Then the content stream :contentStreamId has state :expectedState */ - public function theContentStreamHasState(string $contentStreamIdentifier, string $expectedState) + public function theContentStreamHasState(string $contentStreamId, string $expectedState) { - $contentStreamIdentifier = ContentStreamIdentifier::fromString($contentStreamIdentifier); + $contentStreamId = ContentStreamId::fromString($contentStreamId); $contentStreamFinder = $this->getContentRepository()->getContentStreamFinder(); - $actual = $contentStreamFinder->findStateForContentStream($contentStreamIdentifier); + $actual = $contentStreamFinder->findStateForContentStream($contentStreamId); Assert::assertEquals($expectedState, $actual); } @@ -665,7 +667,7 @@ public function theContentStreamHasState(string $contentStreamIdentifier, string */ public function theCurrentContentStreamHasState(string $expectedState) { - $this->theContentStreamHasState($this->contentStreamIdentifier->jsonSerialize(), $expectedState); + $this->theContentStreamHasState($this->contentStreamId->jsonSerialize(), $expectedState); } /** @@ -674,7 +676,7 @@ public function theCurrentContentStreamHasState(string $expectedState) public function iPruneUnusedContentStreams() { /** @var ContentStreamPruner $contentStreamPruner */ - $contentStreamPruner = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryIdentifier(), new ContentStreamPrunerFactory()); + $contentStreamPruner = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryId(), new ContentStreamPrunerFactory()); $contentStreamPruner->prune(); $this->lastCommandOrEventResult = $contentStreamPruner->getLastCommandResult(); } @@ -685,7 +687,7 @@ public function iPruneUnusedContentStreams() public function iPruneRemovedContentStreamsFromTheEventStream() { /** @var ContentStreamPruner $contentStreamPruner */ - $contentStreamPruner = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryIdentifier(), new ContentStreamPrunerFactory()); + $contentStreamPruner = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryId(), new ContentStreamPrunerFactory()); $contentStreamPruner->pruneRemovedFromEventStream(); } } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/ContentStreamForking.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/ContentStreamForking.php index 7e6c965a687..911b6895615 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/ContentStreamForking.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/ContentStreamForking.php @@ -14,10 +14,10 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\ContentStreamForking\Command\ForkContentStream; use Neos\ContentRepository\Core\Feature\ContentStreamCommandHandler; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * The content stream forking feature trait for behavioral tests @@ -26,9 +26,9 @@ trait ContentStreamForking { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -40,17 +40,17 @@ abstract protected function readPayloadTable(TableNode $payloadTable): array; public function theCommandForkContentStreamIsExecutedWithPayload(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $sourceContentStreamIdentifier = isset($commandArguments['sourceContentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['sourceContentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $sourceContentStreamId = isset($commandArguments['sourceContentStreamId']) + ? ContentStreamId::fromString($commandArguments['sourceContentStreamId']) + : $this->getCurrentContentStreamId(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new ForkContentStream( - ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']), - $sourceContentStreamIdentifier, - $initiatingUserIdentifier + ContentStreamId::fromString($commandArguments['contentStreamId']), + $sourceContentStreamId, + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCopying.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCopying.php index ff6d68c2baf..64b430c1f4b 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCopying.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCopying.php @@ -16,14 +16,14 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeDuplication\Command\CopyNodesRecursively; -use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeAggregateIdentifierMapping; +use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeAggregateIdMapping; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\Tests\Behavior\Features\Helper\ContentGraphs; use Neos\ContentRepository\Core\Tests\Behavior\Features\Helper\NodesByAdapter; @@ -34,11 +34,11 @@ trait NodeCopying { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function getAvailableContentGraphs(): ContentGraphs; @@ -56,7 +56,7 @@ public function theCommandCopyNodesRecursivelyIsExecutedCopyingTheCurrentNodeAgg $contentGraph = reset($contentGraphs); assert($contentGraph instanceof ContentGraphInterface); $subgraph = $contentGraph->getSubgraph( - $this->getCurrentContentStreamIdentifier(), + $this->getCurrentContentStreamId(), $this->getCurrentDimensionSpacePoint(), VisibilityConstraints::withoutRestrictions() ); @@ -65,11 +65,11 @@ public function theCommandCopyNodesRecursivelyIsExecutedCopyingTheCurrentNodeAgg $targetDimensionSpacePoint = isset($commandArguments['targetDimensionSpacePoint']) ? OriginDimensionSpacePoint::fromArray($commandArguments['targetDimensionSpacePoint']) : OriginDimensionSpacePoint::fromDimensionSpacePoint($this->getCurrentDimensionSpacePoint()); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); - $targetSucceedingSiblingNodeAggregateIdentifier = isset($commandArguments['targetSucceedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($commandArguments['targetSucceedingSiblingNodeAggregateIdentifier']) + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); + $targetSucceedingSiblingNodeAggregateId = isset($commandArguments['targetSucceedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($commandArguments['targetSucceedingSiblingNodeAggregateId']) : null; $targetNodeName = isset($commandArguments['targetNodeName']) ? NodeName::fromString($commandArguments['targetNodeName']) @@ -79,12 +79,12 @@ public function theCommandCopyNodesRecursivelyIsExecutedCopyingTheCurrentNodeAgg $subgraph, $currentNode, $targetDimensionSpacePoint, - $initiatingUserIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['targetParentNodeAggregateIdentifier']), - $targetSucceedingSiblingNodeAggregateIdentifier, + $initiatingUserId, + NodeAggregateId::fromString($commandArguments['targetParentNodeAggregateId']), + $targetSucceedingSiblingNodeAggregateId, $targetNodeName ); - $command = $command->withNodeAggregateIdentifierMapping(NodeAggregateIdentifierMapping::fromArray($commandArguments['nodeAggregateIdentifierMapping'])); + $command = $command->withNodeAggregateIdMapping(NodeAggregateIdMapping::fromArray($commandArguments['nodeAggregateIdMapping'])); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCreation.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCreation.php index e0257053919..62eb60702e5 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCreation.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeCreation.php @@ -17,19 +17,19 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamDoesNotExistYet; use Neos\ContentRepository\Core\Feature\NodeCreation\Command\CreateNodeAggregateWithNode; use Neos\ContentRepository\Core\Feature\NodeCreation\Command\CreateNodeAggregateWithNodeAndSerializedProperties; use Neos\ContentRepository\Core\Feature\RootNodeCreation\Command\CreateRootNodeAggregateWithNode; -use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdentifiersByNodePaths; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; /** @@ -39,11 +39,11 @@ trait NodeCreation { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function deserializeProperties(array $properties): PropertyValuesToWrite; @@ -60,23 +60,23 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa public function theCommandCreateRootNodeAggregateWithNodeIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); + $nodeAggregateId = NodeAggregateId::fromString($commandArguments['nodeAggregateId']); $command = new CreateRootNodeAggregateWithNode( - $contentStreamIdentifier, - $nodeAggregateIdentifier, + $contentStreamId, + $nodeAggregateId, NodeTypeName::fromString($commandArguments['nodeTypeName']), - $initiatingUserIdentifier + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); - $this->rootNodeAggregateIdentifier = $nodeAggregateIdentifier; + $this->rootNodeAggregateId = $nodeAggregateId; } /** @@ -100,18 +100,18 @@ public function theCommandCreateRootNodeAggregateWithNodeIsExecutedWithPayloadAn public function theEventRootNodeAggregateWithNodeWasCreatedWasPublishedToStreamWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($eventPayload['nodeAggregateIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($contentStreamIdentifier); + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $nodeAggregateId = NodeAggregateId::fromString($eventPayload['nodeAggregateId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamId); $this->publishEvent('RootNodeAggregateWithNodeWasCreated', $streamName->getEventStreamName(), $eventPayload); - $this->rootNodeAggregateIdentifier = $nodeAggregateIdentifier; + $this->rootNodeAggregateId = $nodeAggregateId; } /** @@ -121,25 +121,25 @@ public function theEventRootNodeAggregateWithNodeWasCreatedWasPublishedToStreamW public function theCommandCreateNodeAggregateWithNodeIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); $originDimensionSpacePoint = isset($commandArguments['originDimensionSpacePoint']) ? OriginDimensionSpacePoint::fromArray($commandArguments['originDimensionSpacePoint']) : OriginDimensionSpacePoint::fromDimensionSpacePoint($this->getCurrentDimensionSpacePoint()); - $userIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $userId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new CreateNodeAggregateWithNode( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), NodeTypeName::fromString($commandArguments['nodeTypeName']), $originDimensionSpacePoint, - $userIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['parentNodeAggregateIdentifier']), - isset($commandArguments['succeedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($commandArguments['succeedingSiblingNodeAggregateIdentifier']) + $userId, + NodeAggregateId::fromString($commandArguments['parentNodeAggregateId']), + isset($commandArguments['succeedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($commandArguments['succeedingSiblingNodeAggregateId']) : null, isset($commandArguments['nodeName']) ? NodeName::fromString($commandArguments['nodeName']) @@ -147,8 +147,8 @@ public function theCommandCreateNodeAggregateWithNodeIsExecutedWithPayload(Table isset($commandArguments['initialPropertyValues']) ? $this->deserializeProperties($commandArguments['initialPropertyValues']) : null, - isset($commandArguments['tetheredDescendantNodeAggregateIdentifiers']) - ? NodeAggregateIdentifiersByNodePaths::fromArray($commandArguments['tetheredDescendantNodeAggregateIdentifiers']) + isset($commandArguments['tetheredDescendantNodeAggregateIds']) + ? NodeAggregateIdsByNodePaths::fromArray($commandArguments['tetheredDescendantNodeAggregateIds']) : null ); @@ -174,24 +174,24 @@ public function theCommandCreateNodeAggregateWithNodeIsExecutedWithPayloadAndExc public function theFollowingCreateNodeAggregateWithNodeCommandsAreExecuted(TableNode $table): void { foreach ($table->getHash() as $row) { - $contentStreamIdentifier = isset($row['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($row['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); + $contentStreamId = isset($row['contentStreamId']) + ? ContentStreamId::fromString($row['contentStreamId']) + : $this->getCurrentContentStreamId(); $originDimensionSpacePoint = isset($row['originDimensionSpacePoint']) ? OriginDimensionSpacePoint::fromJsonString($row['originDimensionSpacePoint']) : OriginDimensionSpacePoint::fromDimensionSpacePoint($this->getCurrentDimensionSpacePoint()); - $initiatingUserIdentifier = isset($row['initiatingUserIdentifier']) - ? UserIdentifier::fromString($row['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $initiatingUserId = isset($row['initiatingUserId']) + ? UserId::fromString($row['initiatingUserId']) + : $this->getCurrentUserId(); $command = new CreateNodeAggregateWithNode( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($row['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($row['nodeAggregateId']), NodeTypeName::fromString($row['nodeTypeName']), $originDimensionSpacePoint, - $initiatingUserIdentifier, - NodeAggregateIdentifier::fromString($row['parentNodeAggregateIdentifier']), - isset($row['succeedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($row['succeedingSiblingNodeAggregateIdentifier']) + $initiatingUserId, + NodeAggregateId::fromString($row['parentNodeAggregateId']), + isset($row['succeedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($row['succeedingSiblingNodeAggregateId']) : null, isset($row['nodeName']) ? NodeName::fromString($row['nodeName']) @@ -199,8 +199,8 @@ public function theFollowingCreateNodeAggregateWithNodeCommandsAreExecuted(Table isset($row['initialPropertyValues']) ? PropertyValuesToWrite::fromJsonString($row['initialPropertyValues']) : null, - isset($row['tetheredDescendantNodeAggregateIdentifiers']) - ? NodeAggregateIdentifiersByNodePaths::fromJsonString($row['tetheredDescendantNodeAggregateIdentifiers']) + isset($row['tetheredDescendantNodeAggregateIds']) + ? NodeAggregateIdsByNodePaths::fromJsonString($row['tetheredDescendantNodeAggregateIds']) : null ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); @@ -217,25 +217,25 @@ public function theFollowingCreateNodeAggregateWithNodeCommandsAreExecuted(Table public function theCommandCreateNodeAggregateWithNodeAndSerializedPropertiesIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $originDimensionSpacePoint = isset($commandArguments['originDimensionSpacePoint']) ? OriginDimensionSpacePoint::fromArray($commandArguments['originDimensionSpacePoint']) : OriginDimensionSpacePoint::fromDimensionSpacePoint($this->getCurrentDimensionSpacePoint()); $command = new CreateNodeAggregateWithNodeAndSerializedProperties( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), NodeTypeName::fromString($commandArguments['nodeTypeName']), $originDimensionSpacePoint, - $initiatingUserIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['parentNodeAggregateIdentifier']), - isset($commandArguments['succeedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($commandArguments['succeedingSiblingNodeAggregateIdentifier']) + $initiatingUserId, + NodeAggregateId::fromString($commandArguments['parentNodeAggregateId']), + isset($commandArguments['succeedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($commandArguments['succeedingSiblingNodeAggregateId']) : null, isset($commandArguments['nodeName']) ? NodeName::fromString($commandArguments['nodeName']) @@ -243,8 +243,8 @@ public function theCommandCreateNodeAggregateWithNodeAndSerializedPropertiesIsEx isset($commandArguments['initialPropertyValues']) ? SerializedPropertyValues::fromArray($commandArguments['initialPropertyValues']) : null, - isset($commandArguments['tetheredDescendantNodeAggregateIdentifiers']) - ? NodeAggregateIdentifiersByNodePaths::fromArray($commandArguments['tetheredDescendantNodeAggregateIdentifiers']) + isset($commandArguments['tetheredDescendantNodeAggregateIds']) + ? NodeAggregateIdsByNodePaths::fromArray($commandArguments['tetheredDescendantNodeAggregateIds']) : null ); @@ -284,12 +284,12 @@ public function theEventNodeAggregateWithNodeWasCreatedWasPublishedToStreamWithP if (!isset($eventPayload['nodeName'])) { $eventPayload['nodeName'] = null; } - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = 'initiating-user-identifier'; + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = 'initiating-user-id'; } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($contentStreamIdentifier); + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamId); $this->publishEvent('NodeAggregateWithNodeWasCreated', $streamName->getEventStreamName(), $eventPayload); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeDisabling.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeDisabling.php index a1741bb9618..e18d7c348ab 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeDisabling.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeDisabling.php @@ -15,14 +15,14 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeDisabling\Command\DisableNodeAggregate; use Neos\ContentRepository\Core\Feature\NodeDisabling\Command\EnableNodeAggregate; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; /** @@ -32,11 +32,11 @@ trait NodeDisabling { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -50,22 +50,22 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa public function theCommandDisableNodeAggregateIsExecutedWithPayload(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); $coveredDimensionSpacePoint = isset($commandArguments['coveredDimensionSpacePoint']) ? DimensionSpacePoint::fromArray($commandArguments['coveredDimensionSpacePoint']) : $this->getCurrentDimensionSpacePoint(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new DisableNodeAggregate( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), $coveredDimensionSpacePoint, NodeVariantSelectionStrategy::from($commandArguments['nodeVariantSelectionStrategy']), - $initiatingUserIdentifier + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); @@ -92,14 +92,14 @@ public function theCommandDisableNodeAggregateIsExecutedWithPayloadAndExceptions public function theEventNodeAggregateWasDisabledWasPublishedWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']) + $streamName = ContentStreamEventStreamName::fromContentStreamId( + ContentStreamId::fromString($eventPayload['contentStreamId']) ); $this->publishEvent('NodeAggregateWasDisabled', $streamName->getEventStreamName(), $eventPayload); @@ -114,14 +114,14 @@ public function theEventNodeAggregateWasDisabledWasPublishedWithPayload(TableNod public function theEventNodeAggregateWasEnabledWasPublishedWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']) + $streamName = ContentStreamEventStreamName::fromContentStreamId( + ContentStreamId::fromString($eventPayload['contentStreamId']) ); $this->publishEvent('NodeAggregateWasEnabled', $streamName->getEventStreamName(), $eventPayload); @@ -136,22 +136,22 @@ public function theEventNodeAggregateWasEnabledWasPublishedWithPayload(TableNode public function theCommandEnableNodeAggregateIsExecutedWithPayload(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); $coveredDimensionSpacePoint = isset($commandArguments['coveredDimensionSpacePoint']) ? DimensionSpacePoint::fromArray($commandArguments['coveredDimensionSpacePoint']) : $this->getCurrentDimensionSpacePoint(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new EnableNodeAggregate( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), $coveredDimensionSpacePoint, NodeVariantSelectionStrategy::from($commandArguments['nodeVariantSelectionStrategy']), - $initiatingUserIdentifier + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeModification.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeModification.php index c9c2eaf3e21..c8c12f034c2 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeModification.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeModification.php @@ -15,14 +15,14 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetNodeProperties; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; use PHPUnit\Framework\Assert; @@ -33,11 +33,11 @@ trait NodeModification { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -50,22 +50,22 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa public function theCommandSetPropertiesIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - if (!isset($commandArguments['initiatingUserIdentifier'])) { - $commandArguments['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($commandArguments['initiatingUserId'])) { + $commandArguments['initiatingUserId'] = (string)$this->getCurrentUserId(); } - if (!isset($commandArguments['contentStreamIdentifier'])) { - $commandArguments['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($commandArguments['contentStreamId'])) { + $commandArguments['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } if (!isset($commandArguments['originDimensionSpacePoint'])) { $commandArguments['originDimensionSpacePoint'] = $this->getCurrentDimensionSpacePoint()->jsonSerialize(); } $command = new SetNodeProperties( - ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + ContentStreamId::fromString($commandArguments['contentStreamId']), + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($commandArguments['originDimensionSpacePoint']), $this->deserializeProperties($commandArguments['propertyValues']), - UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) + UserId::fromString($commandArguments['initiatingUserId']) ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); @@ -92,18 +92,18 @@ public function theCommandSetPropertiesIsExecutedWithPayloadAndExceptionsAreCaug public function theEventNodePropertiesWereSetWasPublishedWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } if (!isset($eventPayload['originDimensionSpacePoint'])) { $eventPayload['originDimensionSpacePoint'] = json_encode($this->getCurrentDimensionSpacePoint()); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $contentStreamIdentifier + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $contentStreamId ); $this->publishEvent('NodePropertiesWereSet', $streamName->getEventStreamName(), $eventPayload); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeMove.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeMove.php index eb231464523..c00d0e43e23 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeMove.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeMove.php @@ -16,12 +16,12 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeMove\Command\MoveNodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\RelationDistributionStrategy; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; /** @@ -31,11 +31,11 @@ trait NodeMove { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -49,37 +49,37 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa public function theCommandMoveNodeIsExecutedWithPayload(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); $dimensionSpacePoint = isset($commandArguments['dimensionSpacePoint']) ? DimensionSpacePoint::fromArray($commandArguments['dimensionSpacePoint']) : $this->getCurrentDimensionSpacePoint(); - $newParentNodeAggregateIdentifier = isset($commandArguments['newParentNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($commandArguments['newParentNodeAggregateIdentifier']) + $newParentNodeAggregateId = isset($commandArguments['newParentNodeAggregateId']) + ? NodeAggregateId::fromString($commandArguments['newParentNodeAggregateId']) : null; - $newPrecedingSiblingNodeAggregateIdentifier = isset($commandArguments['newPrecedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($commandArguments['newPrecedingSiblingNodeAggregateIdentifier']) + $newPrecedingSiblingNodeAggregateId = isset($commandArguments['newPrecedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($commandArguments['newPrecedingSiblingNodeAggregateId']) : null; - $newSucceedingSiblingNodeAggregateIdentifier = isset($commandArguments['newSucceedingSiblingNodeAggregateIdentifier']) - ? NodeAggregateIdentifier::fromString($commandArguments['newSucceedingSiblingNodeAggregateIdentifier']) + $newSucceedingSiblingNodeAggregateId = isset($commandArguments['newSucceedingSiblingNodeAggregateId']) + ? NodeAggregateId::fromString($commandArguments['newSucceedingSiblingNodeAggregateId']) : null; $relationDistributionStrategy = RelationDistributionStrategy::fromString( $commandArguments['relationDistributionStrategy'] ?? null ); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new MoveNodeAggregate( - $contentStreamIdentifier, + $contentStreamId, $dimensionSpacePoint, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), - $newParentNodeAggregateIdentifier, - $newPrecedingSiblingNodeAggregateIdentifier, - $newSucceedingSiblingNodeAggregateIdentifier, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), + $newParentNodeAggregateId, + $newPrecedingSiblingNodeAggregateId, + $newSucceedingSiblingNodeAggregateId, $relationDistributionStrategy, - $initiatingUserIdentifier + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); @@ -106,14 +106,14 @@ public function theCommandMoveNodeIsExecutedWithPayloadAndExceptionsAreCaught(Ta public function theEventNodeAggregateWasMovedWasPublishedWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($contentStreamIdentifier); + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamId); $this->publishEvent('NodeAggregateWasMoved', $streamName->getEventStreamName(), $eventPayload); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeReferencing.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeReferencing.php index f3439d37aab..d80cf9cdd2c 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeReferencing.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeReferencing.php @@ -20,14 +20,14 @@ use Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; use Neos\ContentRepository\Core\SharedModel\Node\ReferenceName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeReferencing\Command\SetNodeReferences; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\SharedModel\Node\PropertyName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; /** @@ -37,11 +37,11 @@ trait NodeReferencing { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -57,19 +57,19 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa public function theCommandSetNodeReferencesIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $sourceOriginDimensionSpacePoint = isset($commandArguments['sourceOriginDimensionSpacePoint']) ? OriginDimensionSpacePoint::fromArray($commandArguments['sourceOriginDimensionSpacePoint']) : OriginDimensionSpacePoint::fromDimensionSpacePoint($this->getCurrentDimensionSpacePoint()); $references = NodeReferencesToWrite::fromReferences( array_map( fn (array $referenceData): NodeReferenceToWrite => new NodeReferenceToWrite( - NodeAggregateIdentifier::fromString($referenceData['target']), + NodeAggregateId::fromString($referenceData['target']), isset($referenceData['properties']) ? $this->deserializeProperties($referenceData['properties']) : null @@ -79,12 +79,12 @@ public function theCommandSetNodeReferencesIsExecutedWithPayload(TableNode $payl ); $command = new SetNodeReferences( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['sourceNodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['sourceNodeAggregateId']), $sourceOriginDimensionSpacePoint, ReferenceName::fromString($commandArguments['referenceName']), $references, - $initiatingUserIdentifier + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); @@ -112,15 +112,15 @@ public function theCommandSetNodeReferencesIsExecutedWithPayloadAndExceptionsAre public function theEventNodeReferencesWereSetWasPublishedWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $contentStreamIdentifier + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $contentStreamId ); $this->publishEvent('NodeReferencesWereSet', $streamName->getEventStreamName(), $eventPayload); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRemoval.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRemoval.php index bbc64527444..a04f35eeca7 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRemoval.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRemoval.php @@ -15,13 +15,13 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeRemoval\Command\RemoveNodeAggregate; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; /** @@ -31,11 +31,11 @@ trait NodeRemoval { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -49,24 +49,24 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa public function theCommandRemoveNodeAggregateIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); $coveredDimensionSpacePoint = isset($commandArguments['coveredDimensionSpacePoint']) ? DimensionSpacePoint::fromArray($commandArguments['coveredDimensionSpacePoint']) : $this->getCurrentDimensionSpacePoint(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new RemoveNodeAggregate( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), $coveredDimensionSpacePoint, NodeVariantSelectionStrategy::from($commandArguments['nodeVariantSelectionStrategy']), - $initiatingUserIdentifier, + $initiatingUserId, isset($commandArguments['removalAttachmentPoint']) - ? NodeAggregateIdentifier::fromString($commandArguments['removalAttachmentPoint']) + ? NodeAggregateId::fromString($commandArguments['removalAttachmentPoint']) : null ); @@ -95,14 +95,14 @@ public function theCommandRemoveNodeAggregateIsExecutedWithPayloadAndExceptionsA public function theEventNodeAggregateWasRemovedWasPublishedWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($contentStreamIdentifier); + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamId); $this->publishEvent('NodeAggregateWasRemoved', $streamName->getEventStreamName(), $eventPayload); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRenaming.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRenaming.php index e4505b1b559..b6173ab9069 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRenaming.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeRenaming.php @@ -14,10 +14,11 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; use PHPUnit\Framework\Assert; @@ -26,11 +27,11 @@ */ trait NodeRenaming { - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; abstract protected function getCurrentDimensionSpacePoint(): ?DimensionSpacePoint; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -38,13 +39,14 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa /** * @Then /^I expect the node "([^"]*)" to have the name "([^"]*)"$/ - * @param string $nodeAggregateIdentifier + * @param string $nodeAggregateId * @param string $nodeName */ - public function iExpectTheNodeToHaveTheName(string $nodeAggregateIdentifier, string $nodeName) + public function iExpectTheNodeToHaveTheName(string $nodeAggregateId, string $nodeName) { foreach ($this->getCurrentSubgraphs() as $adapterName => $subgraph) { - $node = $subgraph->findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier::fromString($nodeAggregateIdentifier)); + assert($subgraph instanceof ContentSubgraphInterface); + $node = $subgraph->findNodeByNodeAggregateId(NodeAggregateId::fromString($nodeAggregateId)); Assert::assertEquals($nodeName, (string)$node->nodeName, 'Node Names do not match in adapter ' . $adapterName); } } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeTypeChange.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeTypeChange.php index 5a794645e19..594961c784a 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeTypeChange.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeTypeChange.php @@ -14,14 +14,14 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Feature\NodeTypeChange\Command\ChangeNodeAggregateType; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; -use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdentifiersByNodePaths; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; use Neos\ContentRepository\Core\Feature\NodeTypeChange\Dto\NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * The node type change trait for behavioral tests @@ -30,9 +30,9 @@ trait NodeTypeChange { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -44,23 +44,23 @@ abstract protected function readPayloadTable(TableNode $payloadTable): array; public function theCommandChangeNodeAggregateTypeIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); - $tetheredDescendantNodeAggregateIdentifiers = isset($commandArguments['tetheredDescendantNodeAggregateIdentifiers']) - ? NodeAggregateIdentifiersByNodePaths::fromArray($commandArguments['tetheredDescendantNodeAggregateIdentifiers']) + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); + $tetheredDescendantNodeAggregateIds = isset($commandArguments['tetheredDescendantNodeAggregateIds']) + ? NodeAggregateIdsByNodePaths::fromArray($commandArguments['tetheredDescendantNodeAggregateIds']) : null; $command = new ChangeNodeAggregateType( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), NodeTypeName::fromString($commandArguments['newNodeTypeName']), NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy::from($commandArguments['strategy']), - $initiatingUserIdentifier, - $tetheredDescendantNodeAggregateIdentifiers + $initiatingUserId, + $tetheredDescendantNodeAggregateIds ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeVariation.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeVariation.php index cc446604e4e..89271c0d919 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeVariation.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/NodeVariation.php @@ -14,13 +14,13 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeVariation\Command\CreateNodeVariant; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\Event\StreamName; /** @@ -30,9 +30,9 @@ trait NodeVariation { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentContentStreamIdentifier(): ?ContentStreamIdentifier; + abstract protected function getCurrentContentStreamId(): ?ContentStreamId; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -46,19 +46,19 @@ abstract protected function publishEvent(string $eventType, StreamName $streamNa public function theCommandCreateNodeVariantIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $contentStreamIdentifier = isset($commandArguments['contentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifier']) - : $this->getCurrentContentStreamIdentifier(); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->getCurrentContentStreamId(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new CreateNodeVariant( - $contentStreamIdentifier, - NodeAggregateIdentifier::fromString($commandArguments['nodeAggregateIdentifier']), + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($commandArguments['sourceOrigin']), OriginDimensionSpacePoint::fromArray($commandArguments['targetOrigin']), - $initiatingUserIdentifier + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); } @@ -85,15 +85,15 @@ public function theCommandCreateNodeVariantIsExecutedWithPayloadAndExceptionsAre public function theEventNodeGeneralizationVariantWasCreatedWasPublishedToStreamWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $contentStreamIdentifier + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $contentStreamId ); $this->publishEvent('NodeGeneralizationVariantWasCreated', $streamName->getEventStreamName(), $eventPayload); @@ -107,15 +107,15 @@ public function theEventNodeGeneralizationVariantWasCreatedWasPublishedToStreamW public function theEventNodeSpecializationVariantWasCreatedWasPublishedToStreamWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $contentStreamIdentifier + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $contentStreamId ); $this->publishEvent('NodeSpecializationVariantWasCreated', $streamName->getEventStreamName(), $eventPayload); @@ -129,15 +129,15 @@ public function theEventNodeSpecializationVariantWasCreatedWasPublishedToStreamW public function theEventNodePeerVariantWasCreatedWasPublishedToStreamWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['contentStreamIdentifier'])) { - $eventPayload['contentStreamIdentifier'] = (string)$this->getCurrentContentStreamIdentifier(); + if (!isset($eventPayload['contentStreamId'])) { + $eventPayload['contentStreamId'] = (string)$this->getCurrentContentStreamId(); } - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - $contentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['contentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $contentStreamIdentifier + $contentStreamId = ContentStreamId::fromString($eventPayload['contentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $contentStreamId ); $this->publishEvent('NodePeerVariantWasCreated', $streamName->getEventStreamName(), $eventPayload); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceCreation.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceCreation.php index 94eff34c9eb..860ab75559a 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceCreation.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceCreation.php @@ -14,13 +14,13 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateRootWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Command\RebaseWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceCommandHandler; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -32,7 +32,7 @@ trait WorkspaceCreation { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -47,16 +47,16 @@ public function theCommandCreateRootWorkspaceIsExecutedWithPayload(TableNode $pa { $commandArguments = $this->readPayloadTable($payloadTable); - $userIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $userId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new CreateRootWorkspace( WorkspaceName::fromString($commandArguments['workspaceName']), new WorkspaceTitle($commandArguments['workspaceTitle'] ?? ucfirst($commandArguments['workspaceName'])), new WorkspaceDescription($commandArguments['workspaceDescription'] ?? 'The workspace "' . $commandArguments['workspaceName'] . '"'), - $userIdentifier, - ContentStreamIdentifier::fromString($commandArguments['newContentStreamIdentifier']) + $userId, + ContentStreamId::fromString($commandArguments['newContentStreamId']) ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); @@ -69,11 +69,11 @@ public function theCommandCreateRootWorkspaceIsExecutedWithPayload(TableNode $pa public function theEventRootWorkspaceWasCreatedWasPublishedToStreamWithPayload(TableNode $payloadTable) { $eventPayload = $this->readPayloadTable($payloadTable); - if (!isset($eventPayload['initiatingUserIdentifier'])) { - $eventPayload['initiatingUserIdentifier'] = (string)$this->getCurrentUserIdentifier(); + if (!isset($eventPayload['initiatingUserId'])) { + $eventPayload['initiatingUserId'] = (string)$this->getCurrentUserId(); } - $newContentStreamIdentifier = ContentStreamIdentifier::fromString($eventPayload['newContentStreamIdentifier']); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($newContentStreamIdentifier); + $newContentStreamId = ContentStreamId::fromString($eventPayload['newContentStreamId']); + $streamName = ContentStreamEventStreamName::fromContentStreamId($newContentStreamId); $this->publishEvent('RootWorkspaceWasCreated', $streamName->getEventStreamName(), $eventPayload); } @@ -85,18 +85,18 @@ public function theEventRootWorkspaceWasCreatedWasPublishedToStreamWithPayload(T public function theCommandCreateWorkspaceIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $userIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $userId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new CreateWorkspace( WorkspaceName::fromString($commandArguments['workspaceName']), WorkspaceName::fromString($commandArguments['baseWorkspaceName']), new WorkspaceTitle($commandArguments['workspaceTitle'] ?? ucfirst($commandArguments['workspaceName'])), new WorkspaceDescription($commandArguments['workspaceDescription'] ?? 'The workspace "' . $commandArguments['workspaceName'] . '"'), - $userIdentifier, - ContentStreamIdentifier::fromString($commandArguments['newContentStreamIdentifier']), - isset($commandArguments['workspaceOwner']) ? UserIdentifier::fromString($commandArguments['workspaceOwner']) : null + $userId, + ContentStreamId::fromString($commandArguments['newContentStreamId']), + isset($commandArguments['workspaceOwner']) ? UserId::fromString($commandArguments['workspaceOwner']) : null ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command);; @@ -111,18 +111,18 @@ public function theCommandCreateWorkspaceIsExecutedWithPayload(TableNode $payloa public function theCommandRebaseWorkspaceIsExecutedWithPayload(TableNode $payloadTable) { $commandArguments = $this->readPayloadTable($payloadTable); - $userIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $userId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); - $rebasedContentStreamIdentifier = isset($commandArguments['rebasedContentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['rebasedContentStreamIdentifier']) - : ContentStreamIdentifier::create(); + $rebasedContentStreamId = isset($commandArguments['rebasedContentStreamId']) + ? ContentStreamId::fromString($commandArguments['rebasedContentStreamId']) + : ContentStreamId::create(); $command = RebaseWorkspace::createFullyDeterministic( WorkspaceName::fromString($commandArguments['workspaceName']), - $userIdentifier, - $rebasedContentStreamIdentifier, + $userId, + $rebasedContentStreamId, ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command);; diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceDiscarding.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceDiscarding.php index 2c9600bf027..8e36ce7d0cf 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceDiscarding.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspaceDiscarding.php @@ -14,11 +14,11 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\DiscardIndividualNodesFromWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\DiscardWorkspace; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -27,7 +27,7 @@ trait WorkspaceDiscarding { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -39,17 +39,17 @@ abstract protected function readPayloadTable(TableNode $payloadTable): array; public function theCommandDiscardWorkspaceIsExecuted(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); - $newContentStreamIdentifier = isset($commandArguments['newContentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['newContentStreamIdentifier']) - : ContentStreamIdentifier::create(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); + $newContentStreamId = isset($commandArguments['newContentStreamId']) + ? ContentStreamId::fromString($commandArguments['newContentStreamId']) + : ContentStreamId::create(); $command = DiscardWorkspace::createFullyDeterministic( WorkspaceName::fromString($commandArguments['workspaceName']), - $initiatingUserIdentifier, - $newContentStreamIdentifier + $initiatingUserId, + $newContentStreamId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); @@ -64,19 +64,19 @@ public function theCommandDiscardWorkspaceIsExecuted(TableNode $payloadTable): v public function theCommandDiscardIndividualNodesFromWorkspaceIsExecuted(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $nodesToDiscard = NodeIdentifiersToPublishOrDiscard::fromArray($commandArguments['nodesToDiscard']); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); - $newContentStreamIdentifier = isset($commandArguments['newContentStreamIdentifier']) - ? ContentStreamIdentifier::fromString($commandArguments['newContentStreamIdentifier']) - : ContentStreamIdentifier::create(); + $nodesToDiscard = NodeIdsToPublishOrDiscard::fromArray($commandArguments['nodesToDiscard']); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); + $newContentStreamId = isset($commandArguments['newContentStreamId']) + ? ContentStreamId::fromString($commandArguments['newContentStreamId']) + : ContentStreamId::create(); $command = DiscardIndividualNodesFromWorkspace::createFullyDeterministic( WorkspaceName::fromString($commandArguments['workspaceName']), $nodesToDiscard, - $initiatingUserIdentifier, - $newContentStreamIdentifier + $initiatingUserId, + $newContentStreamId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command); diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspacePublishing.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspacePublishing.php index 815f9a63c84..4061c2cd50c 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspacePublishing.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Features/WorkspacePublishing.php @@ -14,11 +14,11 @@ use Behat\Gherkin\Node\TableNode; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishIndividualNodesFromWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishWorkspace; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -27,7 +27,7 @@ trait WorkspacePublishing { abstract protected function getContentRepository(): ContentRepository; - abstract protected function getCurrentUserIdentifier(): ?UserIdentifier; + abstract protected function getCurrentUserId(): ?UserId; abstract protected function readPayloadTable(TableNode $payloadTable): array; /** @@ -38,25 +38,25 @@ abstract protected function readPayloadTable(TableNode $payloadTable): array; public function theCommandPublishIndividualNodesFromWorkspaceIsExecuted(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $nodesToPublish = NodeIdentifiersToPublishOrDiscard::fromArray($commandArguments['nodesToPublish']); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $nodesToPublish = NodeIdsToPublishOrDiscard::fromArray($commandArguments['nodesToPublish']); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); - $contentStreamIdentifierForMatchingPart = isset($commandArguments['contentStreamIdentifierForMatchingPart']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifierForMatchingPart']) - : ContentStreamIdentifier::create(); + $contentStreamIdForMatchingPart = isset($commandArguments['contentStreamIdForMatchingPart']) + ? ContentStreamId::fromString($commandArguments['contentStreamIdForMatchingPart']) + : ContentStreamId::create(); - $contentStreamIdentifierForRemainingPart = isset($commandArguments['contentStreamIdentifierForRemainingPart']) - ? ContentStreamIdentifier::fromString($commandArguments['contentStreamIdentifierForRemainingPart']) - : ContentStreamIdentifier::create(); + $contentStreamIdForRemainingPart = isset($commandArguments['contentStreamIdForRemainingPart']) + ? ContentStreamId::fromString($commandArguments['contentStreamIdForRemainingPart']) + : ContentStreamId::create(); $command = PublishIndividualNodesFromWorkspace::createFullyDeterministic( WorkspaceName::fromString($commandArguments['workspaceName']), $nodesToPublish, - $initiatingUserIdentifier, - $contentStreamIdentifierForMatchingPart, - $contentStreamIdentifierForRemainingPart + $initiatingUserId, + $contentStreamIdForMatchingPart, + $contentStreamIdForRemainingPart ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command);; @@ -70,13 +70,13 @@ public function theCommandPublishIndividualNodesFromWorkspaceIsExecuted(TableNod public function theCommandPublishWorkspaceIsExecuted(TableNode $payloadTable): void { $commandArguments = $this->readPayloadTable($payloadTable); - $initiatingUserIdentifier = isset($commandArguments['initiatingUserIdentifier']) - ? UserIdentifier::fromString($commandArguments['initiatingUserIdentifier']) - : $this->getCurrentUserIdentifier(); + $initiatingUserId = isset($commandArguments['initiatingUserId']) + ? UserId::fromString($commandArguments['initiatingUserId']) + : $this->getCurrentUserId(); $command = new PublishWorkspace( WorkspaceName::fromString($commandArguments['workspaceName']), - $initiatingUserIdentifier + $initiatingUserId ); $this->lastCommandOrEventResult = $this->getContentRepository()->handle($command);; diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternals.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternals.php index 6dd7d7365e0..88e1f618264 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternals.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternals.php @@ -13,14 +13,14 @@ use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\Infrastructure\Property\PropertyConverter; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\EventStore\EventStoreInterface; class ContentRepositoryInternals implements ContentRepositoryServiceInterface { public function __construct( // These properties are from ProjectionFactoryDependencies - public readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + public readonly ContentRepositoryId $contentRepositoryId, public readonly EventStoreInterface $eventStore, public readonly EventNormalizer $eventNormalizer, public readonly NodeTypeManager $nodeTypeManager, diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternalsFactory.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternalsFactory.php index 308fc311184..de8bb23231a 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternalsFactory.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/Helpers/ContentRepositoryInternalsFactory.php @@ -14,7 +14,7 @@ class ContentRepositoryInternalsFactory implements ContentRepositoryServiceFacto public function build(ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies): ContentRepositoryServiceInterface { return new ContentRepositoryInternals( - $serviceFactoryDependencies->contentRepositoryIdentifier, + $serviceFactoryDependencies->contentRepositoryId, $serviceFactoryDependencies->eventStore, $serviceFactoryDependencies->eventNormalizer, $serviceFactoryDependencies->nodeTypeManager, diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php index 8c7506b1ac3..fef13146e64 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php @@ -14,9 +14,9 @@ */ use Behat\Gherkin\Node\PyStringNode; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\NodeMigration\NodeMigrationServiceFactory; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\NodeMigration\Command\ExecuteMigration; use Neos\ContentRepository\NodeMigration\NodeMigrationService; use Neos\ContentRepository\NodeMigration\Command\MigrationConfiguration; @@ -33,7 +33,7 @@ trait MigrationsTrait protected NodeMigrationService $nodeMigrationService; abstract protected function getObjectManager(): ObjectManagerInterface; - abstract protected function getContentRepositoryIdentifier(): ContentRepositoryIdentifier; + abstract protected function getContentRepositoryId(): ContentRepositoryId; abstract protected function getContentRepositoryRegistry(): ContentRepositoryRegistry; /** @@ -42,9 +42,9 @@ abstract protected function getContentRepositoryRegistry(): ContentRepositoryReg public function iRunTheFollowingNodeMigration(string $workspaceName, string $contentStreams, PyStringNode $string) { $migrationConfiguration = new MigrationConfiguration(Yaml::parse($string->getRaw())); - $contentStreamIdentifiers = array_map(fn (string $cs) => ContentStreamIdentifier::fromString($cs), explode(',', $contentStreams)); - $command = new ExecuteMigration($migrationConfiguration, WorkspaceName::fromString($workspaceName), $contentStreamIdentifiers); - $nodeMigrationService = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryIdentifier(), new NodeMigrationServiceFactory()); + $contentStreamIds = array_map(fn (string $cs) => ContentStreamId::fromString($cs), explode(',', $contentStreams)); + $command = new ExecuteMigration($migrationConfiguration, WorkspaceName::fromString($workspaceName), $contentStreamIds); + $nodeMigrationService = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryId(), new NodeMigrationServiceFactory()); $nodeMigrationService->executeMigration($command); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/NodeOperationsTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/NodeOperationsTrait.php index 813942c6bfd..70de5829a35 100755 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/NodeOperationsTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/NodeOperationsTrait.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\Dimension\ConfigurationBasedContentDimensionSource; use Neos\ContentRepository\Core\Dimension\ContentDimension; use Neos\ContentRepository\Core\Dimension\ContentDimensionConstraintSet; -use Neos\ContentRepository\Core\Dimension\ContentDimensionIdentifier; +use Neos\ContentRepository\Core\Dimension\ContentDimensionId; use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; use Neos\ContentRepository\Core\Dimension\ContentDimensionValue; use Neos\ContentRepository\Core\Dimension\ContentDimensionValues; @@ -25,7 +25,7 @@ use Neos\ContentRepository\Core\Dimension\ContentDimensionValueVariationEdges; use Neos\ContentRepository\Core\DimensionSpace\ContentDimensionZookeeper; use Neos\ContentRepository\Core\DimensionSpace\InterDimensionalVariationGraph; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Tests\Behavior\Features\Bootstrap\Helpers\ContentRepositoryInternals; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\ObjectManagement\ObjectManagerInterface; @@ -125,7 +125,7 @@ public function iHaveTheFollowingContentDimensions($table) $dimensionConfiguration = []; $dimensions[$row['Identifier']] = new ContentDimension( - new ContentDimensionIdentifier($row['Identifier']), + new ContentDimensionId($row['Identifier']), new ContentDimensionValues($dimensionValues), new ContentDimensionValueVariationEdges($variationEdges), $dimensionConfiguration diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeAggregateTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeAggregateTrait.php index 4952378892a..ca2084c0998 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeAggregateTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeAggregateTrait.php @@ -15,13 +15,13 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregatesTypeIsAmbiguous; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface; use Neos\ContentRepository\Core\Tests\Behavior\Features\Helper\ContentGraphs; use Neos\ContentRepository\Core\Tests\Behavior\Features\Helper\NodeAggregatesByAdapter; @@ -40,15 +40,15 @@ abstract protected function getAvailableContentGraphs(): ContentGraphs; /** * @Then /^I expect the node aggregate "([^"]*)" to exist$/ - * @param string $serializedNodeAggregateIdentifier + * @param string $serializedNodeAggregateId * @throws NodeAggregatesTypeIsAmbiguous */ - public function iExpectTheNodeAggregateToExist(string $serializedNodeAggregateIdentifier): void + public function iExpectTheNodeAggregateToExist(string $serializedNodeAggregateId): void { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($serializedNodeAggregateIdentifier); - $this->initializeCurrentNodeAggregates(function (ContentGraphInterface $contentGraph, string $adapterName) use ($nodeAggregateIdentifier) { - $currentNodeAggregate = $contentGraph->findNodeAggregateByIdentifier($this->contentStreamIdentifier, $nodeAggregateIdentifier); - Assert::assertNotNull($currentNodeAggregate, sprintf('Node aggregate "%s" was not found in the current content stream "%s" in adapter "%s".', $nodeAggregateIdentifier, $this->contentStreamIdentifier, $adapterName)); + $nodeAggregateId = NodeAggregateId::fromString($serializedNodeAggregateId); + $this->initializeCurrentNodeAggregates(function (ContentGraphInterface $contentGraph, string $adapterName) use ($nodeAggregateId) { + $currentNodeAggregate = $contentGraph->findNodeAggregateById($this->contentStreamId, $nodeAggregateId); + Assert::assertNotNull($currentNodeAggregate, sprintf('Node aggregate "%s" was not found in the current content stream "%s" in adapter "%s".', $nodeAggregateId, $this->contentStreamId, $adapterName)); return $currentNodeAggregate; }); } @@ -175,8 +175,8 @@ public function iExpectThisNodeAggregateToHaveNoParentNodeAggregates(): void $this->assertOnCurrentNodeAggregates(function (NodeAggregate $nodeAggregate, string $adapterName) { Assert::assertEmpty( iterator_to_array($this->getActiveContentGraphs()[$adapterName]->findParentNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId )), 'Did not expect parent node aggregates in adapter "' . $adapterName . '".' ); @@ -185,27 +185,27 @@ public function iExpectThisNodeAggregateToHaveNoParentNodeAggregates(): void /** * @Then /^I expect this node aggregate to have the parent node aggregates (.*)$/ - * @param string $serializedExpectedNodeAggregateIdentifiers + * @param string $serializedExpectedNodeAggregateIds */ - public function iExpectThisNodeAggregateToHaveTheParentNodeAggregates(string $serializedExpectedNodeAggregateIdentifiers): void + public function iExpectThisNodeAggregateToHaveTheParentNodeAggregates(string $serializedExpectedNodeAggregateIds): void { - $expectedNodeAggregateIdentifiers = NodeAggregateIdentifiers::fromJsonString($serializedExpectedNodeAggregateIdentifiers); - $this->assertOnCurrentNodeAggregates(function (NodeAggregate $nodeAggregate, string $adapterName) use ($expectedNodeAggregateIdentifiers) { - $expectedDiscriminators = array_values(array_map(function (NodeAggregateIdentifier $nodeAggregateIdentifier) { - return $this->contentStreamIdentifier . ';' . $nodeAggregateIdentifier; - }, $expectedNodeAggregateIdentifiers->getIterator()->getArrayCopy())); + $expectedNodeAggregateIds = NodeAggregateIds::fromJsonString($serializedExpectedNodeAggregateIds); + $this->assertOnCurrentNodeAggregates(function (NodeAggregate $nodeAggregate, string $adapterName) use ($expectedNodeAggregateIds) { + $expectedDiscriminators = array_values(array_map(function (NodeAggregateId $nodeAggregateId) { + return $this->contentStreamId . ';' . $nodeAggregateId; + }, $expectedNodeAggregateIds->getIterator()->getArrayCopy())); $actualDiscriminators = array_values(array_map(function (NodeAggregate $parentNodeAggregate) { - return $parentNodeAggregate->contentStreamIdentifier . ';' . $parentNodeAggregate->nodeAggregateIdentifier; + return $parentNodeAggregate->contentStreamId . ';' . $parentNodeAggregate->nodeAggregateId; }, iterator_to_array( $this->getActiveContentGraphs()[$adapterName]->findParentNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ) ))); Assert::assertSame( $expectedDiscriminators, $actualDiscriminators, - 'Parent node aggregate identifiers do not match in adapter "' . $adapterName . '", expected ' . json_encode($expectedDiscriminators) . ', got ' . json_encode($actualDiscriminators) + 'Parent node aggregate ids do not match in adapter "' . $adapterName . '", expected ' . json_encode($expectedDiscriminators) . ', got ' . json_encode($actualDiscriminators) ); }); } @@ -218,8 +218,8 @@ public function iExpectThisNodeAggregateToHaveNoChildNodeAggregates(): void $this->assertOnCurrentNodeAggregates(function (NodeAggregate $nodeAggregate, string $adapterName) { Assert::assertEmpty( iterator_to_array($this->getActiveContentGraphs()[$adapterName]->findChildNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId )), 'No child node aggregates were expected in adapter "' . $adapterName . '".' ); @@ -228,26 +228,26 @@ public function iExpectThisNodeAggregateToHaveNoChildNodeAggregates(): void /** * @Then /^I expect this node aggregate to have the child node aggregates (.*)$/ - * @param string $serializedExpectedNodeAggregateIdentifiers + * @param string $serializedExpectedNodeAggregateIds */ - public function iExpectThisNodeAggregateToHaveTheChildNodeAggregates(string $serializedExpectedNodeAggregateIdentifiers): void + public function iExpectThisNodeAggregateToHaveTheChildNodeAggregates(string $serializedExpectedNodeAggregateIds): void { - $expectedNodeAggregateIdentifiers = NodeAggregateIdentifiers::fromJsonString($serializedExpectedNodeAggregateIdentifiers); - $this->assertOnCurrentNodeAggregates(function (NodeAggregate $nodeAggregate, string $adapterName) use ($expectedNodeAggregateIdentifiers) { - $expectedDiscriminators = array_values(array_map(function (NodeAggregateIdentifier $nodeAggregateIdentifier) { - return $this->contentStreamIdentifier . ':' . $nodeAggregateIdentifier; - }, $expectedNodeAggregateIdentifiers->getIterator()->getArrayCopy())); + $expectedNodeAggregateIds = NodeAggregateIds::fromJsonString($serializedExpectedNodeAggregateIds); + $this->assertOnCurrentNodeAggregates(function (NodeAggregate $nodeAggregate, string $adapterName) use ($expectedNodeAggregateIds) { + $expectedDiscriminators = array_values(array_map(function (NodeAggregateId $nodeAggregateId) { + return $this->contentStreamId . ':' . $nodeAggregateId; + }, $expectedNodeAggregateIds->getIterator()->getArrayCopy())); $actualDiscriminators = array_values(array_map(function (NodeAggregate $parentNodeAggregate) { - return $parentNodeAggregate->contentStreamIdentifier . ':' . $parentNodeAggregate->nodeAggregateIdentifier; + return $parentNodeAggregate->contentStreamId . ':' . $parentNodeAggregate->nodeAggregateId; }, iterator_to_array($this->getActiveContentGraphs()[$adapterName]->findChildNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId )))); Assert::assertSame( $expectedDiscriminators, $actualDiscriminators, - 'Child node aggregate identifiers do not match in adapter "' . $adapterName . '", expected ' . json_encode($expectedDiscriminators) . ', got ' . json_encode($actualDiscriminators) + 'Child node aggregate ids do not match in adapter "' . $adapterName . '", expected ' . json_encode($expectedDiscriminators) . ', got ' . json_encode($actualDiscriminators) ); }); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeTrait.php index e974db4b549..3c4d5cca131 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectedNodeTrait.php @@ -16,7 +16,7 @@ use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Core\Projection\ContentGraph\References; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; @@ -45,7 +45,7 @@ abstract protected function getAvailableContentGraphs(): ContentGraphs; abstract protected function getCurrentSubgraphs(): ContentSubgraphs; - abstract protected function getRootNodeAggregateIdentifier(): ?NodeAggregateIdentifier; + abstract protected function getRootNodeAggregateId(): ?NodeAggregateId; abstract protected function readPayloadTable(TableNode $payloadTable): array; @@ -56,13 +56,13 @@ protected function getCurrentNodes(): ?NodesByAdapter /** * @When /^I go to the parent node of node aggregate "([^"]*)"$/ - * @param string $serializedNodeAggregateIdentifier + * @param string $serializedNodeAggregateId */ - public function iGoToTheParentNodeOfNode(string $serializedNodeAggregateIdentifier): void + public function iGoToTheParentNodeOfNode(string $serializedNodeAggregateId): void { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($serializedNodeAggregateIdentifier); - $this->initializeCurrentNodesFromContentSubgraphs(function (ContentSubgraphInterface $subgraph) use ($nodeAggregateIdentifier) { - return $subgraph->findParentNode($nodeAggregateIdentifier); + $nodeAggregateId = NodeAggregateId::fromString($serializedNodeAggregateId); + $this->initializeCurrentNodesFromContentSubgraphs(function (ContentSubgraphInterface $subgraph) use ($nodeAggregateId) { + return $subgraph->findParentNode($nodeAggregateId); }); } @@ -75,7 +75,7 @@ public function iGetTheNodeAtPath(string $serializedNodePath): void { $nodePath = NodePath::fromString($serializedNodePath); $this->initializeCurrentNodesFromContentSubgraphs(function (ContentSubgraphInterface $subgraph) use ($nodePath) { - return $subgraph->findNodeByPath($nodePath, $this->getRootNodeAggregateIdentifier()); + return $subgraph->findNodeByPath($nodePath, $this->getRootNodeAggregateId()); }); } @@ -88,16 +88,16 @@ public function iExpectANodeIdentifiedByXToExistInTheContentGraph(string $serial { $nodeDiscriminator = NodeDiscriminator::fromShorthand($serializedNodeDiscriminator); $this->initializeCurrentNodesFromContentGraphs(function (ContentGraphInterface $contentGraph, string $adapterName) use ($nodeDiscriminator) { - $currentNode = $contentGraph->findNodeByIdentifiers( - $nodeDiscriminator->getContentStreamIdentifier(), - $nodeDiscriminator->getNodeAggregateIdentifier(), + $currentNode = $contentGraph->findNodeById( + $nodeDiscriminator->getContentStreamId(), + $nodeDiscriminator->getNodeAggregateId(), $nodeDiscriminator->getOriginDimensionSpacePoint() ); Assert::assertNotNull( $currentNode, - 'Node with aggregate identifier "' . $nodeDiscriminator->getNodeAggregateIdentifier() + 'Node with aggregate id "' . $nodeDiscriminator->getNodeAggregateId() . '" and originating in dimension space point "' . $nodeDiscriminator->getOriginDimensionSpacePoint() - . '" was not found in content stream "' . $nodeDiscriminator->getContentStreamIdentifier() . '"' + . '" was not found in content stream "' . $nodeDiscriminator->getContentStreamId() . '"' . '" in adapter "' . $adapterName . '"' ); @@ -107,18 +107,18 @@ public function iExpectANodeIdentifiedByXToExistInTheContentGraph(string $serial /** * @Then /^I expect node aggregate identifier "([^"]*)" to lead to node (.*)$/ - * @param string $serializedNodeAggregateIdentifier + * @param string $serializedNodeAggregateId * @param string $serializedNodeDiscriminator */ - public function iExpectNodeAggregateIdentifierToLeadToNode( - string $serializedNodeAggregateIdentifier, + public function iExpectNodeAggregateIdToLeadToNode( + string $serializedNodeAggregateId, string $serializedNodeDiscriminator ): void { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($serializedNodeAggregateIdentifier); + $nodeAggregateId = NodeAggregateId::fromString($serializedNodeAggregateId); $expectedDiscriminator = NodeDiscriminator::fromShorthand($serializedNodeDiscriminator); - $this->initializeCurrentNodesFromContentSubgraphs(function (ContentSubgraphInterface $subgraph, string $adapterName) use ($nodeAggregateIdentifier, $expectedDiscriminator) { - $currentNode = $subgraph->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier); - Assert::assertNotNull($currentNode, 'No node could be found by node aggregate identifier "' . $nodeAggregateIdentifier . '" in content subgraph "' . $this->dimensionSpacePoint . '@' . $this->contentStreamIdentifier . '" and adapter "' . $adapterName . '"'); + $this->initializeCurrentNodesFromContentSubgraphs(function (ContentSubgraphInterface $subgraph, string $adapterName) use ($nodeAggregateId, $expectedDiscriminator) { + $currentNode = $subgraph->findNodeByNodeAggregateId($nodeAggregateId); + Assert::assertNotNull($currentNode, 'No node could be found by node aggregate id "' . $nodeAggregateId . '" in content subgraph "' . $this->dimensionSpacePoint . '@' . $this->contentStreamId . '" and adapter "' . $adapterName . '"'); $actualDiscriminator = NodeDiscriminator::fromNode($currentNode); Assert::assertTrue($expectedDiscriminator->equals($actualDiscriminator), 'Node discriminators do not match. Expected was ' . json_encode($expectedDiscriminator) . ' , given was ' . json_encode($actualDiscriminator) . ' in adapter "' . $adapterName . '"'); return $currentNode; @@ -127,19 +127,22 @@ public function iExpectNodeAggregateIdentifierToLeadToNode( /** * @Then /^I expect node aggregate identifier "([^"]*)" to lead to no node$/ - * @param string $serializedNodeAggregateIdentifier + * @param string $serializedNodeAggregateId */ - public function iExpectNodeAggregateIdentifierToLeadToNoNode(string $serializedNodeAggregateIdentifier): void + public function iExpectNodeAggregateIdToLeadToNoNode(string $serializedNodeAggregateId): void { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($serializedNodeAggregateIdentifier); + $nodeAggregateId = NodeAggregateId::fromString($serializedNodeAggregateId); foreach ($this->getCurrentSubgraphs() as $adapterName => $subgraph) { - $nodeByAggregateIdentifier = $subgraph->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier); - Assert::assertNull( - $nodeByAggregateIdentifier, - 'A node was found by node aggregate identifier "' . $nodeAggregateIdentifier - . '" in content subgraph {' . $this->dimensionSpacePoint . ',' . $this->contentStreamIdentifier + assert($subgraph instanceof ContentSubgraphInterface); + $nodeByAggregateId = $subgraph->findNodeByNodeAggregateId($nodeAggregateId); + if (!is_null($nodeByAggregateId)) { + Assert::fail( + 'A node was found by node aggregate id "' . $nodeAggregateId + . '" in content subgraph {' . $this->dimensionSpacePoint . ',' . $this->contentStreamId . '} and adapter "' . $adapterName . '"' - ); + ); + } + } } @@ -151,14 +154,14 @@ public function iExpectNodeAggregateIdentifierToLeadToNoNode(string $serializedN */ public function iExpectPathToLeadToNode(string $serializedNodePath, string $serializedNodeDiscriminator): void { - if (!$this->getRootNodeAggregateIdentifier()) { - throw new \Exception('ERROR: rootNodeAggregateIdentifier needed for running this step. You need to use "the event RootNodeAggregateWithNodeWasCreated was published with payload" to create a root node..'); + if (!$this->getRootNodeAggregateId()) { + throw new \Exception('ERROR: rootNodeAggregateId needed for running this step. You need to use "the event RootNodeAggregateWithNodeWasCreated was published with payload" to create a root node..'); } $nodePath = NodePath::fromString($serializedNodePath); $expectedDiscriminator = NodeDiscriminator::fromShorthand($serializedNodeDiscriminator); $this->initializeCurrentNodesFromContentSubgraphs(function (ContentSubgraphInterface $subgraph, string $adapterName) use ($nodePath, $expectedDiscriminator) { - $currentNode = $subgraph->findNodeByPath($nodePath, $this->getRootNodeAggregateIdentifier()); - Assert::assertNotNull($currentNode, 'No node could be found by node path "' . $nodePath . '" in content subgraph "' . $this->dimensionSpacePoint . '@' . $this->contentStreamIdentifier . '" and adapter "' . $adapterName . '"'); + $currentNode = $subgraph->findNodeByPath($nodePath, $this->getRootNodeAggregateId()); + Assert::assertNotNull($currentNode, 'No node could be found by node path "' . $nodePath . '" in content subgraph "' . $this->dimensionSpacePoint . '@' . $this->contentStreamId . '" and adapter "' . $adapterName . '"'); $actualDiscriminator = NodeDiscriminator::fromNode($currentNode); Assert::assertTrue($expectedDiscriminator->equals($actualDiscriminator), 'Node discriminators do not match. Expected was ' . json_encode($expectedDiscriminator) . ' , given was ' . json_encode($actualDiscriminator) . ' in adapter "' . $adapterName . '"'); return $currentNode; @@ -172,38 +175,38 @@ public function iExpectPathToLeadToNode(string $serializedNodePath, string $seri */ public function iExpectPathToLeadToNoNode(string $serializedNodePath): void { - if (!$this->getRootNodeAggregateIdentifier()) { - throw new \Exception('ERROR: rootNodeAggregateIdentifier needed for running this step. You need to use "the event RootNodeAggregateWithNodeWasCreated was published with payload" to create a root node..'); + if (!$this->getRootNodeAggregateId()) { + throw new \Exception('ERROR: rootNodeAggregateId needed for running this step. You need to use "the event RootNodeAggregateWithNodeWasCreated was published with payload" to create a root node..'); } $nodePath = NodePath::fromString($serializedNodePath); foreach ($this->getCurrentSubgraphs() as $adapterName => $subgraph) { - $nodeByPath = $subgraph->findNodeByPath($nodePath, $this->getRootNodeAggregateIdentifier()); - Assert::assertNull($nodeByPath, 'A node was found by node path "' . $nodePath . '" in content subgraph "' . $this->dimensionSpacePoint . '@' . $this->contentStreamIdentifier . '" and adapter "' . $adapterName . '"'); + $nodeByPath = $subgraph->findNodeByPath($nodePath, $this->getRootNodeAggregateId()); + Assert::assertNull($nodeByPath, 'A node was found by node path "' . $nodePath . '" in content subgraph "' . $this->dimensionSpacePoint . '@' . $this->contentStreamId . '" and adapter "' . $adapterName . '"'); } } /** * @Then /^I expect node aggregate identifier "([^"]*)" and node path "([^"]*)" to lead to node (.*)$/ - * @param string $serializedNodeAggregateIdentifier + * @param string $serializedNodeAggregateId * @param string $serializedNodePath * @param string $serializedNodeDiscriminator * @throws \Exception */ - public function iExpectNodeAggregateIdentifierAndNodePathToLeadToNode(string $serializedNodeAggregateIdentifier, string $serializedNodePath, string $serializedNodeDiscriminator): void + public function iExpectNodeAggregateIdAndNodePathToLeadToNode(string $serializedNodeAggregateId, string $serializedNodePath, string $serializedNodeDiscriminator): void { - $this->iExpectNodeAggregateIdentifierToLeadToNode($serializedNodeAggregateIdentifier, $serializedNodeDiscriminator); + $this->iExpectNodeAggregateIdToLeadToNode($serializedNodeAggregateId, $serializedNodeDiscriminator); $this->iExpectPathToLeadToNode($serializedNodePath, $serializedNodeDiscriminator); } /** * @Then /^I expect node aggregate identifier "([^"]*)" and node path "([^"]*)" to lead to no node$/ - * @param string $serializedNodeAggregateIdentifier + * @param string $serializedNodeAggregateId * @param string $serializedNodePath * @throws \Exception */ - public function iExpectNodeAggregateIdentifierAndNodePathToLeadToNoNode(string $serializedNodeAggregateIdentifier, string $serializedNodePath): void + public function iExpectNodeAggregateIdAndNodePathToLeadToNoNode(string $serializedNodeAggregateId, string $serializedNodePath): void { - $this->iExpectNodeAggregateIdentifierToLeadToNoNode($serializedNodeAggregateIdentifier); + $this->iExpectNodeAggregateIdToLeadToNoNode($serializedNodeAggregateId); $this->iExpectPathToLeadToNoNode($serializedNodePath); } @@ -345,7 +348,7 @@ public function iExpectThisNodeToHaveTheFollowingReferences(TableNode $expectedR { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) use ($expectedReferences) { $actualReferences = $this->getCurrentSubgraphs()[$adapterName] - ->findReferencedNodes($currentNode->nodeAggregateIdentifier); + ->findReferencedNodes($currentNode->nodeAggregateId); $this->assertReferencesMatch($expectedReferences, $actualReferences, $adapterName); }); @@ -359,7 +362,7 @@ public function iExpectThisNodeToHaveNoReferences(): void { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) { $references = $this->getCurrentSubgraphs()[$adapterName] - ->findReferencedNodes($currentNode->nodeAggregateIdentifier); + ->findReferencedNodes($currentNode->nodeAggregateId); Assert::assertCount(0, $references, 'No references were expected in adapter "' . $adapterName . '".'); }); @@ -374,7 +377,7 @@ public function iExpectThisNodeToBeReferencedBy(TableNode $expectedReferences): { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) use ($expectedReferences) { $actualReferences = $this->getCurrentSubgraphs()[$adapterName] - ->findReferencingNodes($currentNode->nodeAggregateIdentifier); + ->findReferencingNodes($currentNode->nodeAggregateId); $this->assertReferencesMatch($expectedReferences, $actualReferences, $adapterName); }); @@ -453,7 +456,7 @@ public function iExpectThisNodeToNotBeReferenced(): void { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) { $originNodes = $this->getCurrentSubgraphs()[$adapterName] - ->findReferencingNodes($currentNode->nodeAggregateIdentifier); + ->findReferencingNodes($currentNode->nodeAggregateId); Assert::assertCount(0, $originNodes, 'No referencing nodes were expected in adapter "' . $adapterName . '".'); }); } @@ -468,13 +471,13 @@ public function iExpectThisNodeToBeTheChildOfNode(string $serializedParentNodeDi $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) use ($expectedParentDiscriminator) { $subgraph = $this->getCurrentSubgraphs()[$adapterName]; - $parent = $subgraph->findParentNode($currentNode->nodeAggregateIdentifier); + $parent = $subgraph->findParentNode($currentNode->nodeAggregateId); Assert::assertInstanceOf(Node::class, $parent, 'Parent not found.'); $actualParentDiscriminator = NodeDiscriminator::fromNode($parent); Assert::assertTrue($expectedParentDiscriminator->equals($actualParentDiscriminator), 'Parent discriminator does not match in adapter "' . $adapterName . '". Expected was ' . json_encode($expectedParentDiscriminator) . ', given was ' . json_encode($actualParentDiscriminator)); $expectedChildDiscriminator = NodeDiscriminator::fromNode($currentNode); - $child = $subgraph->findChildNodeConnectedThroughEdgeName($parent->nodeAggregateIdentifier, $currentNode->nodeName); + $child = $subgraph->findChildNodeConnectedThroughEdgeName($parent->nodeAggregateId, $currentNode->nodeName); $actualChildDiscriminator = NodeDiscriminator::fromNode($child); Assert::assertTrue($expectedChildDiscriminator->equals($actualChildDiscriminator), 'Child discriminator does not match in adapter "' . $adapterName . '". Expected was ' . json_encode($expectedChildDiscriminator) . ', given was ' . json_encode($actualChildDiscriminator)); }); @@ -486,9 +489,9 @@ public function iExpectThisNodeToBeTheChildOfNode(string $serializedParentNodeDi public function iExpectThisNodeToHaveNoParentNode(): void { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) { - $parentNode = $this->getCurrentSubgraphs()[$adapterName]->findParentNode($currentNode->nodeAggregateIdentifier); - $unexpectedNodeAggregateIdentifier = $parentNode ? $parentNode->nodeAggregateIdentifier : ''; - Assert::assertNull($parentNode, 'Parent node ' . $unexpectedNodeAggregateIdentifier . ' was found in adapter "' . $adapterName . '", but none was expected.'); + $parentNode = $this->getCurrentSubgraphs()[$adapterName]->findParentNode($currentNode->nodeAggregateId); + $unexpectedNodeAggregateId = $parentNode ? $parentNode->nodeAggregateId : ''; + Assert::assertNull($parentNode, 'Parent node ' . $unexpectedNodeAggregateId . ' was found in adapter "' . $adapterName . '", but none was expected.'); }); } @@ -501,11 +504,11 @@ public function iExpectThisNodeToHaveTheFollowingChildNodes(TableNode $expectedC $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) use ($expectedChildNodesTable) { $subgraph = $this->getCurrentSubgraphs()[$adapterName]; $actualChildNodes = []; - foreach ($subgraph->findChildNodes($currentNode->nodeAggregateIdentifier) as $actualChildNode) { + foreach ($subgraph->findChildNodes($currentNode->nodeAggregateId) as $actualChildNode) { $actualChildNodes[] = $actualChildNode; } - Assert::assertEquals(count($expectedChildNodesTable->getHash()), $subgraph->countChildNodes($currentNode->nodeAggregateIdentifier), 'ContentSubgraph::countChildNodes returned a wrong value in adapter "' . $adapterName . '"'); + Assert::assertEquals(count($expectedChildNodesTable->getHash()), $subgraph->countChildNodes($currentNode->nodeAggregateId), 'ContentSubgraph::countChildNodes returned a wrong value in adapter "' . $adapterName . '"'); Assert::assertCount(count($expectedChildNodesTable->getHash()), $actualChildNodes, 'ContentSubgraph::findChildNodes: Child node count does not match in adapter "' . $adapterName . '"'); foreach ($expectedChildNodesTable->getHash() as $index => $row) { @@ -528,9 +531,9 @@ public function iExpectThisNodeToHaveNoChildNodes(): void { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) { $subgraph = $this->getCurrentSubgraphs()[$adapterName]; - $actualChildNodes = $subgraph->findChildNodes($currentNode->nodeAggregateIdentifier); + $actualChildNodes = $subgraph->findChildNodes($currentNode->nodeAggregateId); - Assert::assertEquals(0, $subgraph->countChildNodes($currentNode->nodeAggregateIdentifier), 'ContentSubgraph::countChildNodes indicated present child nodes in adapter "' . $adapterName . '"'); + Assert::assertEquals(0, $subgraph->countChildNodes($currentNode->nodeAggregateId), 'ContentSubgraph::countChildNodes indicated present child nodes in adapter "' . $adapterName . '"'); Assert::assertEquals(0, count($actualChildNodes), 'ContentSubgraph::findChildNodes returned present child nodes in adapter "' . $adapterName . '"'); }); } @@ -543,7 +546,7 @@ public function iExpectThisNodeToHaveTheFollowingSiblings(TableNode $expectedSib { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) use ($expectedSiblingsTable) { $actualSiblings = []; - foreach ($this->getCurrentSubgraphs()[$adapterName]->findSiblings($currentNode->nodeAggregateIdentifier) as $actualSibling) { + foreach ($this->getCurrentSubgraphs()[$adapterName]->findSiblings($currentNode->nodeAggregateId) as $actualSibling) { $actualSiblings[] = $actualSibling; } Assert::assertCount(count($expectedSiblingsTable->getHash()), $actualSiblings, 'ContentSubgraph::findSiblings: Sibling count does not match in adapter "' . $adapterName . '"'); @@ -561,7 +564,7 @@ public function iExpectThisNodeToHaveTheFollowingSiblings(TableNode $expectedSib public function iExpectThisNodeToHaveNoSiblings(): void { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) { - $actualSiblings = $this->getCurrentSubgraphs()[$adapterName]->findSiblings($currentNode->nodeAggregateIdentifier); + $actualSiblings = $this->getCurrentSubgraphs()[$adapterName]->findSiblings($currentNode->nodeAggregateId); Assert::assertCount(0, $actualSiblings, 'ContentSubgraph::findSiblings: No siblings were expected in adapter "' . $adapterName . '"'); }); } @@ -574,7 +577,7 @@ public function iExpectThisNodeToHaveTheFollowingPrecedingSiblings(TableNode $ex { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) use ($expectedPrecedingSiblingsTable) { $actualSiblings = []; - foreach ($this->getCurrentSubgraphs()[$adapterName]->findPrecedingSiblings($currentNode->nodeAggregateIdentifier) as $actualSibling) { + foreach ($this->getCurrentSubgraphs()[$adapterName]->findPrecedingSiblings($currentNode->nodeAggregateId) as $actualSibling) { $actualSiblings[] = $actualSibling; } Assert::assertCount(count($expectedPrecedingSiblingsTable->getHash()), $actualSiblings, 'ContentSubgraph::findPrecedingSiblings: Sibling count does not match in adapter "' . $adapterName . '"'); @@ -592,7 +595,7 @@ public function iExpectThisNodeToHaveTheFollowingPrecedingSiblings(TableNode $ex public function iExpectThisNodeToHaveNoPrecedingSiblings(): void { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) { - $actualSiblings = $this->getCurrentSubgraphs()[$adapterName]->findPrecedingSiblings($currentNode->nodeAggregateIdentifier); + $actualSiblings = $this->getCurrentSubgraphs()[$adapterName]->findPrecedingSiblings($currentNode->nodeAggregateId); Assert::assertCount(0, $actualSiblings, 'ContentSubgraph::findPrecedingSiblings: No siblings were expected in adapter "' . $adapterName . '"'); }); } @@ -605,7 +608,7 @@ public function iExpectThisNodeToHaveTheFollowingSucceedingSiblings(TableNode $e { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) use ($expectedSucceedingSiblingsTable) { $actualSiblings = []; - foreach ($this->getCurrentSubgraphs()[$adapterName]->findSucceedingSiblings($currentNode->nodeAggregateIdentifier) as $actualSibling) { + foreach ($this->getCurrentSubgraphs()[$adapterName]->findSucceedingSiblings($currentNode->nodeAggregateId) as $actualSibling) { $actualSiblings[] = $actualSibling; } Assert::assertCount(count($expectedSucceedingSiblingsTable->getHash()), $actualSiblings, 'ContentSubgraph::findSucceedingSiblings: Sibling count does not match in adapter "' . $adapterName . '"'); @@ -623,7 +626,7 @@ public function iExpectThisNodeToHaveTheFollowingSucceedingSiblings(TableNode $e public function iExpectThisNodeToHaveNoSucceedingSiblings(): void { $this->assertOnCurrentNodes(function (Node $currentNode, string $adapterName) { - $actualSiblings = $this->getCurrentSubgraphs()[$adapterName]->findSucceedingSiblings($currentNode->nodeAggregateIdentifier); + $actualSiblings = $this->getCurrentSubgraphs()[$adapterName]->findSucceedingSiblings($currentNode->nodeAggregateId); Assert::assertCount(0, $actualSiblings, 'ContentSubgraph::findSucceedingSiblings: No siblings were expected'); }); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php index 67664edb90e..3991263597f 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ProjectionIntegrityViolationDetectionTrait.php @@ -13,7 +13,7 @@ */ use Neos\ContentGraph\DoctrineDbalAdapter\DoctrineDbalProjectionIntegrityViolationDetectionRunnerFactory; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\StructureAdjustment\StructureAdjustmentServiceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; @@ -33,7 +33,7 @@ trait ProjectionIntegrityViolationDetectionTrait protected Result $lastIntegrityViolationDetectionResult; abstract protected function getObjectManager(): ObjectManagerInterface; - abstract protected function getContentRepositoryIdentifier(): ContentRepositoryIdentifier; + abstract protected function getContentRepositoryId(): ContentRepositoryId; abstract protected function getContentRepositoryRegistry(): ContentRepositoryRegistry; /** @@ -42,7 +42,7 @@ abstract protected function getContentRepositoryRegistry(): ContentRepositoryReg public function iRunIntegrityViolationDetection(): void { $dbalClient = $this->objectManager->get(DbalClientInterface::class); - $projectionIntegrityViolationDetectionRunner = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryIdentifier(), new DoctrineDbalProjectionIntegrityViolationDetectionRunnerFactory($dbalClient)); + $projectionIntegrityViolationDetectionRunner = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryId(), new DoctrineDbalProjectionIntegrityViolationDetectionRunnerFactory($dbalClient)); $this->lastIntegrityViolationDetectionResult = $projectionIntegrityViolationDetectionRunner->run(); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ReadModelInstantiationTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ReadModelInstantiationTrait.php index 9cfb6552fc1..745965c9320 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ReadModelInstantiationTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/ReadModelInstantiationTrait.php @@ -15,8 +15,8 @@ use Behat\Gherkin\Node\TableNode; use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; @@ -29,7 +29,7 @@ */ trait ReadModelInstantiationTrait { - protected ?ContentStreamIdentifier $contentStreamIdentifier = null; + protected ?ContentStreamId $contentStreamId = null; protected ?DimensionSpacePoint $dimensionSpacePoint = null; @@ -45,12 +45,12 @@ abstract protected function readPayloadTable(TableNode $payloadTable): array; /** * @When /^the read model with node aggregate identifier "([^"]*)" is instantiated and exceptions are caught$/ - * @param string $rawNodeAggregateIdentifier + * @param string $rawNodeAggregateId */ - public function theReadModelWithNodeAggregateIdentifierXIsInstantiatedAndExceptionsAreCaught(string $rawNodeAggregateIdentifier): void + public function theReadModelWithNodeAggregateIdXIsInstantiatedAndExceptionsAreCaught(string $rawNodeAggregateId): void { try { - $this->theReadModelWithNodeAggregateIdentifierXIsInstantiated($rawNodeAggregateIdentifier); + $this->theReadModelWithNodeAggregateIdXIsInstantiated($rawNodeAggregateId); } catch (\Exception $exception) { $this->lastInstantiationException = $exception; } @@ -58,19 +58,19 @@ public function theReadModelWithNodeAggregateIdentifierXIsInstantiatedAndExcepti /** * @When /^the read model with node aggregate identifier "([^"]*)" is instantiated$/ - * @param string $rawNodeAggregateIdentifier + * @param string $rawNodeAggregateId */ - public function theReadModelWithNodeAggregateIdentifierXIsInstantiated(string $rawNodeAggregateIdentifier): void + public function theReadModelWithNodeAggregateIdXIsInstantiated(string $rawNodeAggregateId): void { foreach ($this->getActiveContentGraphs() as $adapterName => $contentGraph) { assert($contentGraph instanceof ContentGraphInterface); $subgraph = $contentGraph->getSubgraph( - $this->contentStreamIdentifier, + $this->contentStreamId, $this->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); - $node = $subgraph->findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier::fromString($rawNodeAggregateIdentifier)); + $node = $subgraph->findNodeByNodeAggregateId(NodeAggregateId::fromString($rawNodeAggregateId)); $this->currentReadModel = $node; } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php index 81777fc9309..a520555ee5c 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php @@ -13,7 +13,7 @@ */ use Behat\Gherkin\Node\TableNode; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; use Neos\ContentRepository\StructureAdjustment\Adjustment\StructureAdjustment; @@ -27,12 +27,12 @@ */ trait StructureAdjustmentsTrait { - abstract protected function getContentRepositoryIdentifier(): ContentRepositoryIdentifier; + abstract protected function getContentRepositoryId(): ContentRepositoryId; abstract protected function getContentRepositoryRegistry(): ContentRepositoryRegistry; protected function getStructureAdjustmentService(): StructureAdjustmentService { - return $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryIdentifier(), new StructureAdjustmentServiceFactory()); + return $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryId(), new StructureAdjustmentServiceFactory()); } /** @@ -81,12 +81,12 @@ protected function assertEqualStructureAdjustments(TableNode $expectedAdjustment Assert::assertCount(count($expectedAdjustments->getHash()), $actualAdjustments, 'Number of adjustments must match.'); foreach ($expectedAdjustments->getHash() as $i => $row) { - if (!isset($row['Type']) || !isset($row['nodeAggregateIdentifier'])) { - Assert::fail('Type and nodeAggregateIdentifier must be specified in assertion!'); + if (!isset($row['Type']) || !isset($row['nodeAggregateId'])) { + Assert::fail('Type and nodeAggregateId must be specified in assertion!'); } - $adjustment = $this->findAdjustmentsBasedOnTypeAndNodeAggregateIdentifier($actualAdjustments, $row['Type'], $row['nodeAggregateIdentifier']); + $adjustment = $this->findAdjustmentsBasedOnTypeAndNodeAggregateId($actualAdjustments, $row['Type'], $row['nodeAggregateId']); foreach ($row as $k => $v) { - if (in_array($k, ['Type', 'nodeAggregateIdentifier'])) { + if (in_array($k, ['Type', 'nodeAggregateId'])) { continue; } @@ -95,14 +95,14 @@ protected function assertEqualStructureAdjustments(TableNode $expectedAdjustment } } - private function findAdjustmentsBasedOnTypeAndNodeAggregateIdentifier(array $actualAdjustments, string $type, string $nodeAggregateIdentifier): StructureAdjustment + private function findAdjustmentsBasedOnTypeAndNodeAggregateId(array $actualAdjustments, string $type, string $nodeAggregateId): StructureAdjustment { foreach ($actualAdjustments as $adjustment) { assert($adjustment instanceof StructureAdjustment); - if ($adjustment->getType() === $type && $adjustment->getArguments()['nodeAggregateIdentifier'] === $nodeAggregateIdentifier) { + if ($adjustment->getType() === $type && $adjustment->getArguments()['nodeAggregateId'] === $nodeAggregateId) { return $adjustment; } } - Assert::fail('Adjustment not found for type "' . $type . '" and node aggregate identifier "' . $nodeAggregateIdentifier . '"'); + Assert::fail('Adjustment not found for type "' . $type . '" and node aggregate id "' . $nodeAggregateId . '"'); } } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/ContentGraphs.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/ContentGraphs.php index aaf97e23d75..93cb339c66b 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/ContentGraphs.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/ContentGraphs.php @@ -82,16 +82,16 @@ public function offsetUnset(mixed $offset): never } /** - * @param array $identifiers + * @param array $contentGraphIds */ - public function reduceTo(array $identifiers): self + public function reduceTo(array $contentGraphIds): self { $reduction = []; - foreach ($identifiers as $identifier) { - if (array_key_exists($identifier, $this->contentGraphs)) { - $reduction[$identifier] = $this->contentGraphs[$identifier]; + foreach ($contentGraphIds as $contentGraphId) { + if (array_key_exists($contentGraphId, $this->contentGraphs)) { + $reduction[$contentGraphId] = $this->contentGraphs[$contentGraphId]; } else { - throw new \InvalidArgumentException('Unknown adapter "' . $identifier . '"', 1648406324); + throw new \InvalidArgumentException('Unknown adapter "' . $contentGraphId . '"', 1648406324); } } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/NodeDiscriminator.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/NodeDiscriminator.php index ade5b0741f5..74202cf4699 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/NodeDiscriminator.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/NodeDiscriminator.php @@ -16,8 +16,8 @@ use Neos\Cache\CacheAwareInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; /** @@ -25,34 +25,34 @@ * * Represents the identity of a specific node in the content graph and is thus composed of * * the content stream the node exists in - * * the node's aggregate's external identifier + * * the node's aggregate's external id * * the dimension space point the node originates in within its aggregate */ -final class NodeDiscriminator implements CacheAwareInterface, \JsonSerializable +final class NodeDiscriminator implements \JsonSerializable { - private ContentStreamIdentifier $contentStreamIdentifier; + private ContentStreamId $contentStreamId; - private NodeAggregateIdentifier $nodeAggregateIdentifier; + private NodeAggregateId $nodeAggregateId; private OriginDimensionSpacePoint $originDimensionSpacePoint; private function __construct( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamId, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $originDimensionSpacePoint ) { - $this->contentStreamIdentifier = $contentStreamIdentifier; - $this->nodeAggregateIdentifier = $nodeAggregateIdentifier; + $this->contentStreamId = $contentStreamId; + $this->nodeAggregateId = $nodeAggregateId; $this->originDimensionSpacePoint = $originDimensionSpacePoint; } public static function fromShorthand(string $shorthand): self { - list($contentStreamIdentifier, $nodeAggregateIdentifier, $originDimensionSpacePoint) = explode(';', $shorthand); + list($contentStreamId, $nodeAggregateId, $originDimensionSpacePoint) = explode(';', $shorthand); return new self( - ContentStreamIdentifier::fromString($contentStreamIdentifier), - NodeAggregateIdentifier::fromString($nodeAggregateIdentifier), + ContentStreamId::fromString($contentStreamId), + NodeAggregateId::fromString($nodeAggregateId), OriginDimensionSpacePoint::fromJsonString($originDimensionSpacePoint) ); } @@ -60,20 +60,20 @@ public static function fromShorthand(string $shorthand): self public static function fromNode(Node $node): self { return new NodeDiscriminator( - $node->subgraphIdentity->contentStreamIdentifier, - $node->nodeAggregateIdentifier, + $node->subgraphIdentity->contentStreamId, + $node->nodeAggregateId, $node->originDimensionSpacePoint ); } - public function getContentStreamIdentifier(): ContentStreamIdentifier + public function getContentStreamId(): ContentStreamId { - return $this->contentStreamIdentifier; + return $this->contentStreamId; } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return $this->nodeAggregateIdentifier; + return $this->nodeAggregateId; } public function getOriginDimensionSpacePoint(): OriginDimensionSpacePoint @@ -81,29 +81,24 @@ public function getOriginDimensionSpacePoint(): OriginDimensionSpacePoint return $this->originDimensionSpacePoint; } - public function getCacheEntryIdentifier(): string - { - return sha1(json_encode($this)); - } - public function equals(NodeDiscriminator $other): bool { - return $this->contentStreamIdentifier->equals($other->getContentStreamIdentifier()) - && $this->getNodeAggregateIdentifier()->equals($other->getNodeAggregateIdentifier()) + return $this->contentStreamId->equals($other->getContentStreamId()) + && $this->getNodeAggregateId()->equals($other->getNodeAggregateId()) && $this->getOriginDimensionSpacePoint()->equals($other->getOriginDimensionSpacePoint()); } public function jsonSerialize(): array { return [ - 'contentStreamIdentifier' => $this->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $this->nodeAggregateIdentifier, + 'contentStreamId' => $this->contentStreamId, + 'nodeAggregateId' => $this->nodeAggregateId, 'originDimensionSpacePoint' => $this->originDimensionSpacePoint ]; } public function __toString(): string { - return $this->getCacheEntryIdentifier(); + return sha1(json_encode($this)); } } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/TestingNodeAggregateIdentifier.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/TestingNodeAggregateId.php similarity index 96% rename from Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/TestingNodeAggregateIdentifier.php rename to Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/TestingNodeAggregateId.php index cde6e83998f..5934d26b33f 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/TestingNodeAggregateIdentifier.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Helper/TestingNodeAggregateId.php @@ -14,7 +14,7 @@ /** * The testing node aggregate identifier value object */ -final class TestingNodeAggregateIdentifier +final class TestingNodeAggregateId { const NON_EXISTENT = 'i-do-not-exist'; diff --git a/Neos.ContentRepository.Core/Tests/Unit/Dimension/ConfigurationBasedContentDimensionSourceTest.php b/Neos.ContentRepository.Core/Tests/Unit/Dimension/ConfigurationBasedContentDimensionSourceTest.php index a0ec79d5a8a..f3e2a74e3ec 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/Dimension/ConfigurationBasedContentDimensionSourceTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/Dimension/ConfigurationBasedContentDimensionSourceTest.php @@ -104,8 +104,8 @@ public function testDimensionsAreInitializedInCorrectOrder() */ public function testDimensionValuesAreCorrectlyInitialized() { - $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionA')); - $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionB')); + $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionA')); + $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionB')); $this->assertEquals( new Dimension\ContentDimensionValue( @@ -181,7 +181,7 @@ public function testDimensionValuesAreCorrectlyInitialized() */ public function testSpecializationsAreCorrectlyInitialized() { - $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionA')); + $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionA')); $this->assertSame( [ 'valueA1.1' => $dimensionA->getValue('valueA1.1') @@ -211,7 +211,7 @@ public function testSpecializationsAreCorrectlyInitialized() $dimensionA->getGeneralization($dimensionA->getValue('valueA2')) ); - $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionB')); + $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionB')); $this->assertSame( [], $dimensionB->getSpecializations($dimensionB->getValue('valueB1')) @@ -245,8 +245,8 @@ public function testSpecializationsAreCorrectlyInitialized() */ public function testMaximumDepthIsCorrectlyInitialized() { - $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionA')); - $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionB')); + $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionA')); + $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionB')); $this->assertEquals( new Dimension\ContentDimensionValueSpecializationDepth(1), @@ -263,20 +263,20 @@ public function testMaximumDepthIsCorrectlyInitialized() */ public function testRestrictionsAreCorrectlyInitialized() { - $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionA')); - $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionB')); + $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionA')); + $dimensionB = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionB')); $valueA1 = $dimensionA->getValue('valueA1'); $this->assertSame( false, - $valueA1->getConstraints($dimensionB->identifier)->isWildcardAllowed + $valueA1->getConstraints($dimensionB->id)->isWildcardAllowed ); $this->assertEquals( [ 'valueB1' => true, 'valueB2' => false ], - $valueA1->getConstraints($dimensionB->identifier)->identifierRestrictions + $valueA1->getConstraints($dimensionB->id)->identifierRestrictions ); $valueA11 = $dimensionA->getValue('valueA1.1'); @@ -288,14 +288,14 @@ public function testRestrictionsAreCorrectlyInitialized() $valueA2 = $dimensionA->getValue('valueA2'); $this->assertSame( true, - $valueA2->getConstraints($dimensionB->identifier)->isWildcardAllowed + $valueA2->getConstraints($dimensionB->id)->isWildcardAllowed ); $this->assertEquals( [ 'valueB1' => false, 'valueB2' => true ], - $valueA2->getConstraints($dimensionB->identifier)->identifierRestrictions + $valueA2->getConstraints($dimensionB->id)->identifierRestrictions ); $valueB1 = $dimensionB->getValue('valueB1'); @@ -322,7 +322,7 @@ public function testRestrictionsAreCorrectlyInitialized() */ public function testDimensionConfigurationValuesAreCorrectlyInitialized() { - $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionA')); + $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionA')); $this->assertSame('anotherValue', $dimensionA->getConfigurationValue('dimensionConfiguration.anotherKey')); } @@ -332,7 +332,7 @@ public function testDimensionConfigurationValuesAreCorrectlyInitialized() */ public function testDimensionValueConfigurationValuesAreCorrectlyInitialized() { - $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionIdentifier('dimensionA')); + $dimensionA = $this->subject->getDimension(new Dimension\ContentDimensionId('dimensionA')); $dimensionValueA1 = $dimensionA->getValue('valueA1'); $this->assertSame('value', $dimensionValueA1->getConfigurationValue('dimensionValueConfiguration.key')); diff --git a/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionIdentifierTest.php b/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionIdentifierTest.php index f50d59a2b28..29154164955 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionIdentifierTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionIdentifierTest.php @@ -24,7 +24,7 @@ class ContentDimensionIdentifierTest extends UnitTestCase { public function testInitializationThrowsExceptionForEmptyValue() { - $this->expectException(Dimension\Exception\ContentDimensionIdentifierIsInvalid::class); - new Dimension\ContentDimensionIdentifier(''); + $this->expectException(Dimension\Exception\ContentDimensionIdIsInvalid::class); + new Dimension\ContentDimensionId(''); } } diff --git a/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionTest.php b/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionTest.php index b15eb65cf22..7684195e713 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/Dimension/ContentDimensionTest.php @@ -32,7 +32,7 @@ protected function setUp(): void { parent::setUp(); - $dimensionIdentifier = new Dimension\ContentDimensionIdentifier('market'); + $dimensionIdentifier = new Dimension\ContentDimensionId('market'); $values['world'] = new Dimension\ContentDimensionValue( 'world', new Dimension\ContentDimensionValueSpecializationDepth(0), @@ -69,7 +69,7 @@ public function testInitializationThrowsExceptionWithoutAnyDimensionValuesGiven( { $this->expectException(ContentDimensionValuesAreInvalid::class); new Dimension\ContentDimension( - new Dimension\ContentDimensionIdentifier('dimension'), + new Dimension\ContentDimensionId('dimension'), new Dimension\ContentDimensionValues([]), Dimension\ContentDimensionValueVariationEdges::createEmpty() ); diff --git a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/ContentDimensionZookeeperTest.php b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/ContentDimensionZookeeperTest.php index 92ab56e017b..4442b3a527d 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/ContentDimensionZookeeperTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/ContentDimensionZookeeperTest.php @@ -41,8 +41,8 @@ protected function setUp(): void public function getAllowedCombinationsCorrectlyDeterminesAllowedCombinations() { $allowedCombinations = $this->subject->getAllowedCombinations(); - $marketIdentifier = new Dimension\ContentDimensionIdentifier('market'); - $languageIdentifier = new Dimension\ContentDimensionIdentifier('language'); + $marketIdentifier = new Dimension\ContentDimensionId('market'); + $languageIdentifier = new Dimension\ContentDimensionId('language'); $this->assertSame(6, count($allowedCombinations)); $this->assertContains([ diff --git a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/ExampleDimensionSource.php b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/ExampleDimensionSource.php index d64e86b15cf..932c66a9bbb 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/ExampleDimensionSource.php +++ b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/ExampleDimensionSource.php @@ -95,25 +95,25 @@ protected function initializeDimensions(): void $this->dimensions = [ 'market' => new Dimension\ContentDimension( - new Dimension\ContentDimensionIdentifier('market'), + new Dimension\ContentDimensionId('market'), $marketValues, Dimension\ContentDimensionValueVariationEdges::createEmpty() ), 'language' => new Dimension\ContentDimension( - new Dimension\ContentDimensionIdentifier('language'), + new Dimension\ContentDimensionId('language'), $languageValues, Dimension\ContentDimensionValueVariationEdges::createEmpty() ) ]; } - public function getDimension(Dimension\ContentDimensionIdentifier $dimensionIdentifier): ?Dimension\ContentDimension + public function getDimension(Dimension\ContentDimensionId $dimensionId): ?Dimension\ContentDimension { if (is_null($this->dimensions)) { $this->initializeDimensions(); } - return $this->dimensions[(string)$dimensionIdentifier] ?? null; + return $this->dimensions[(string)$dimensionId] ?? null; } /** diff --git a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/NullExampleDimensionSource.php b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/NullExampleDimensionSource.php index cdd81450c77..51c9500ee73 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/NullExampleDimensionSource.php +++ b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/NullExampleDimensionSource.php @@ -19,7 +19,7 @@ */ class NullExampleDimensionSource implements Dimension\ContentDimensionSourceInterface { - public function getDimension(Dimension\ContentDimensionIdentifier $dimensionIdentifier): ?Dimension\ContentDimension + public function getDimension(Dimension\ContentDimensionId $dimensionId): ?Dimension\ContentDimension { return null; } diff --git a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/VariationExampleDimensionSource.php b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/VariationExampleDimensionSource.php index 4fa91a2a59f..25cba9c0fa5 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/VariationExampleDimensionSource.php +++ b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/Fixtures/VariationExampleDimensionSource.php @@ -38,7 +38,7 @@ protected function initializeDimensions() $this->dimensions = [ 'dimensionA' => new Dimension\ContentDimension( - new Dimension\ContentDimensionIdentifier('dimensionA'), + new Dimension\ContentDimensionId('dimensionA'), new Dimension\ContentDimensionValues([ $dimensionAValue1->value => $dimensionAValue1, $dimensionAValue11->value => $dimensionAValue11, @@ -52,7 +52,7 @@ protected function initializeDimensions() ]) ), 'dimensionB' => new Dimension\ContentDimension( - new Dimension\ContentDimensionIdentifier('dimensionB'), + new Dimension\ContentDimensionId('dimensionB'), new Dimension\ContentDimensionValues([ $dimensionBValue1->value => $dimensionBValue1, $dimensionBValue11->value => $dimensionBValue11, @@ -68,13 +68,13 @@ protected function initializeDimensions() ]; } - public function getDimension(Dimension\ContentDimensionIdentifier $dimensionIdentifier): ?Dimension\ContentDimension + public function getDimension(Dimension\ContentDimensionId $dimensionId): ?Dimension\ContentDimension { if (!$this->dimensions) { $this->initializeDimensions(); } - return $this->dimensions[(string)$dimensionIdentifier] ?? null; + return $this->dimensions[(string)$dimensionId] ?? null; } /** diff --git a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/InterDimensionalVariationGraphTest.php b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/InterDimensionalVariationGraphTest.php index d174061c617..c74c209080d 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/InterDimensionalVariationGraphTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/DimensionSpace/InterDimensionalVariationGraphTest.php @@ -618,7 +618,7 @@ public function testDetermineWeightNormalizationBaseEvaluatesToMaximumDimensionD $firstDepth = new Dimension\ContentDimensionValueSpecializationDepth(random_int(0, 100)); $firstDummy = new Dimension\ContentDimensionValue('firstDummy', $firstDepth); $firstDimension = new Dimension\ContentDimension( - new Dimension\ContentDimensionIdentifier('first'), + new Dimension\ContentDimensionId('first'), new Dimension\ContentDimensionValues([$firstDummy]), Dimension\ContentDimensionValueVariationEdges::createEmpty() ); @@ -626,7 +626,7 @@ public function testDetermineWeightNormalizationBaseEvaluatesToMaximumDimensionD $secondDepth = new Dimension\ContentDimensionValueSpecializationDepth(random_int(0, 100)); $secondDummy = new Dimension\ContentDimensionValue('secondDummy', $secondDepth); $secondDimension = new Dimension\ContentDimension( - new Dimension\ContentDimensionIdentifier('second'), + new Dimension\ContentDimensionId('second'), new Dimension\ContentDimensionValues([$secondDummy]), Dimension\ContentDimensionValueVariationEdges::createEmpty() ); diff --git a/Neos.ContentRepository.Core/Tests/Unit/Domain/Model/NodeTypeTest.php b/Neos.ContentRepository.Core/Tests/Unit/Domain/Model/NodeTypeTest.php index 1ec9c644129..b25972b2242 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/Domain/Model/NodeTypeTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/Domain/Model/NodeTypeTest.php @@ -1,4 +1,5 @@ getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $nodeType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository.Testing:Text'), [], [], + $this->getMockBuilder(NodeTypeManager::class) + ->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); self::assertSame('Neos.ContentRepository.Testing:Text', $nodeType->getName()); } @@ -139,7 +143,10 @@ public function aNodeTypeHasAName() public function setDeclaredSuperTypesExpectsAnArrayOfNodeTypesAsKeys() { $this->expectException(\InvalidArgumentException::class); - new NodeType('ContentRepository:Folder', ['foo' => true], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + new NodeType(NodeTypeName::fromString('ContentRepository:Folder'), ['foo' => true], [], + $this->getMockBuilder(NodeTypeManager::class) + ->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock() + ); } /** @@ -148,7 +155,8 @@ public function setDeclaredSuperTypesExpectsAnArrayOfNodeTypesAsKeys() public function setDeclaredSuperTypesAcceptsAnArrayOfNodeTypes() { $this->expectException(\InvalidArgumentException::class); - new NodeType('ContentRepository:Folder', ['foo'], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + new NodeType(NodeTypeName::fromString('ContentRepository:Folder'), ['foo'], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); } /** @@ -156,11 +164,16 @@ public function setDeclaredSuperTypesAcceptsAnArrayOfNodeTypes() */ public function nodeTypesCanHaveAnyNumberOfSuperTypes() { - $baseType = new NodeType('Neos.ContentRepository:Base', [], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $baseType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); - $timeableNodeType = new NodeType('Neos.ContentRepository.Testing:TimeableContent', [], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $timeableNodeType = new NodeType( + NodeTypeName::fromString('Neos.ContentRepository.Testing:TimeableContent'), + [], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock() + ); $documentType = new NodeType( - 'Neos.ContentRepository.Testing:Document', + NodeTypeName::fromString('Neos.ContentRepository.Testing:Document'), [ 'Neos.ContentRepository:Base' => $baseType, 'Neos.ContentRepository.Testing:TimeableContent' => $timeableNodeType, @@ -168,9 +181,13 @@ public function nodeTypesCanHaveAnyNumberOfSuperTypes() [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock() ); - $hideableNodeType = new NodeType('Neos.ContentRepository.Testing:HideableContent', [], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $hideableNodeType = new NodeType( + NodeTypeName::fromString('Neos.ContentRepository.Testing:HideableContent'), + [], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock() + ); $pageType = new NodeType( - 'Neos.ContentRepository.Testing:Page', + NodeTypeName::fromString('Neos.ContentRepository.Testing:Page'), [ 'Neos.ContentRepository.Testing:Document' => $documentType, 'Neos.ContentRepository.Testing:HideableContent' => $hideableNodeType, @@ -201,7 +218,8 @@ public function nodeTypesCanHaveAnyNumberOfSuperTypes() */ public function labelIsEmptyStringByDefault() { - $baseType = new NodeType('Neos.ContentRepository:Base', [], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $baseType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); self::assertSame('', $baseType->getLabel()); } @@ -210,26 +228,17 @@ public function labelIsEmptyStringByDefault() */ public function propertiesAreEmptyArrayByDefault() { - $baseType = new NodeType('Neos.ContentRepository:Base', [], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $baseType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); self::assertSame([], $baseType->getProperties()); } - /** - * @test - */ - public function hasConfigurationInitializesTheNodeType() - { - $nodeType = $this->getMockBuilder(NodeType::class)->disableOriginalConstructor()->setMethods(['initialize'])->getMock(); - $nodeType->expects(self::once())->method('initialize'); - $nodeType->hasConfiguration('foo'); - } - /** * @test */ public function hasConfigurationReturnsTrueIfSpecifiedConfigurationPathExists() { - $nodeType = new NodeType('Neos.ContentRepository:Base', [], [ + $nodeType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [ 'someKey' => [ 'someSubKey' => 'someValue' ] @@ -242,26 +251,17 @@ public function hasConfigurationReturnsTrueIfSpecifiedConfigurationPathExists() */ public function hasConfigurationReturnsFalseIfSpecifiedConfigurationPathDoesNotExist() { - $nodeType = new NodeType('Neos.ContentRepository:Base', [], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $nodeType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); self::assertFalse($nodeType->hasConfiguration('some.nonExisting.path')); } - /** - * @test - */ - public function getConfigurationInitializesTheNodeType() - { - $nodeType = $this->getMockBuilder(NodeType::class)->disableOriginalConstructor()->setMethods(['initialize'])->getMock(); - $nodeType->expects(self::once())->method('initialize'); - $nodeType->getConfiguration('foo'); - } - /** * @test */ public function getConfigurationReturnsTheConfigurationWithTheSpecifiedPath() { - $nodeType = new NodeType('Neos.ContentRepository:Base', [], [ + $nodeType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [ 'someKey' => [ 'someSubKey' => 'someValue' ] @@ -274,46 +274,17 @@ public function getConfigurationReturnsTheConfigurationWithTheSpecifiedPath() */ public function getConfigurationReturnsNullIfTheSpecifiedPathDoesNotExist() { - $nodeType = new NodeType('Neos.ContentRepository:Base', [], [], $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + $nodeType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [], + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); self::assertNull($nodeType->getConfiguration('some.nonExisting.path')); } - /** - * data source for accessingConfigurationOptionsInitializesTheNodeType() - */ - public function gettersThatRequiresInitialization() - { - return [ - ['getFullConfiguration'], - ['getLabel'], - ['getNodeLabelGenerator'], - ['getProperties'], - ['getDefaultValuesForProperties'], - ['getAutoCreatedChildNodes'], - ]; - } - - /** - * @param string $getter - * @test - * @dataProvider gettersThatRequiresInitialization - */ - public function accessingConfigurationOptionsInitializesTheNodeType($getter) - { - $mockObjectManager = $this->createMock(ObjectManagerInterface::class); - $nodeType = $this->getAccessibleMock(NodeType::class, ['initialize'], [], '', false); - $nodeType->_set('objectManager', $mockObjectManager); - $nodeType->_set('nodeLabelGenerator', $this->createMock(NodeLabelGeneratorInterface::class)); - $nodeType->expects(self::atLeastOnce())->method('initialize'); - $nodeType->$getter(); - } - /** * @test */ public function defaultValuesForPropertiesHandlesDateTypes() { - $nodeType = new NodeType('Neos.ContentRepository:Base', [], [ + $nodeType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [ 'properties' => [ 'date' => [ 'type' => 'DateTime', @@ -445,7 +416,8 @@ protected function getNodeType($nodeTypeName) } } - return new NodeType($nodeTypeName, $declaredSuperTypes, $configuration, $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); + return new NodeType(NodeTypeName::fromString($nodeTypeName), $declaredSuperTypes, $configuration, + $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(), $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); } /** @@ -455,7 +427,7 @@ public function getAutoCreatedChildNodesReturnsLowercasePaths() { $childNodeConfiguration = ['type' => 'Neos.ContentRepository:Base']; $mockNodeTypeManager = $this->getMockBuilder(NodeTypeManager::class)->disableOriginalConstructor()->getMock(); - $baseType = new NodeType('Neos.ContentRepository:Base', [], [ + $baseType = new NodeType(NodeTypeName::fromString('Neos.ContentRepository:Base'), [], [ 'childNodes' => ['nodeName' => $childNodeConfiguration] ], $mockNodeTypeManager, $this->getMockBuilder(ObjectManagerInterface::class)->getMock()); $mockNodeTypeManager->expects(self::any())->method('getNodeType')->will(self::returnValue($baseType)); diff --git a/Neos.ContentRepository.Export/src/Processors/AssetExportProcessor.php b/Neos.ContentRepository.Export/src/Processors/AssetExportProcessor.php index 0ff81183d20..9c8c03da0a5 100644 --- a/Neos.ContentRepository.Export/src/Processors/AssetExportProcessor.php +++ b/Neos.ContentRepository.Export/src/Processors/AssetExportProcessor.php @@ -46,7 +46,7 @@ public function run(): ProcessorResult if ($liveWorkspace === null) { return ProcessorResult::error('Failed to find live workspace'); } - $assetFilter = AssetUsageFilter::create()->withContentStream($liveWorkspace->currentContentStreamIdentifier)->groupByAsset(); + $assetFilter = AssetUsageFilter::create()->withContentStream($liveWorkspace->currentContentStreamId)->groupByAsset(); $numberOfExportedAssets = 0; $numberOfExportedImageVariants = 0; diff --git a/Neos.ContentRepository.Export/src/Processors/EventExportProcessor.php b/Neos.ContentRepository.Export/src/Processors/EventExportProcessor.php index 809c0d4eb89..31115d0d002 100644 --- a/Neos.ContentRepository.Export/src/Processors/EventExportProcessor.php +++ b/Neos.ContentRepository.Export/src/Processors/EventExportProcessor.php @@ -39,7 +39,7 @@ public function run(): ProcessorResult return ProcessorResult::error('Failed to find live workspace'); } $streamName = StreamName::fromString( - 'Neos.ContentRepository:ContentStream:' . $liveWorkspace->currentContentStreamIdentifier + 'Neos.ContentRepository:ContentStream:' . $liveWorkspace->currentContentStreamId ); $eventStream = $this->eventStore->load($streamName); diff --git a/Neos.ContentRepository.Export/src/Processors/EventStoreImportProcessor.php b/Neos.ContentRepository.Export/src/Processors/EventStoreImportProcessor.php index 05180e9821d..ea754b08add 100644 --- a/Neos.ContentRepository.Export/src/Processors/EventStoreImportProcessor.php +++ b/Neos.ContentRepository.Export/src/Processors/EventStoreImportProcessor.php @@ -13,8 +13,8 @@ use Neos\ContentRepository\Export\Severity; use Neos\ContentRepository\Core\Feature\ContentStreamCreation\Event\ContentStreamWasCreated; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Event\RootWorkspaceWasCreated; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -40,7 +40,7 @@ public function __construct( private readonly Filesystem $files, private readonly EventStoreInterface $eventStore, private readonly EventNormalizer $eventNormalizer, - private ?ContentStreamIdentifier $contentStreamIdentifier, + private ?ContentStreamId $contentStreamIdentifier, ) {} public function onMessage(\Closure $callback): void @@ -113,7 +113,7 @@ public function run(): ProcessorResult $this->normalizeEvent( new ContentStreamWasCreated( $this->contentStreamIdentifier, - UserIdentifier::forSystemUser(), + UserId::forSystemUser(), ) ) ); @@ -131,7 +131,7 @@ public function run(): ProcessorResult $workspaceName, WorkspaceTitle::fromString('live workspace'), WorkspaceDescription::fromString('live workspace'), - UserIdentifier::forSystemUser(), + UserId::forSystemUser(), $this->contentStreamIdentifier ) ) @@ -180,14 +180,14 @@ private function normalizeEvent(EventInterface|DecoratedEvent $event): Event /** * @param array $payload - * @return ContentStreamIdentifier + * @return ContentStreamId */ - private static function extractContentStreamIdentifier(array $payload): ContentStreamIdentifier + private static function extractContentStreamIdentifier(array $payload): ContentStreamId { if (!isset($payload['contentStreamIdentifier']) || !is_string($payload['contentStreamIdentifier'])) { throw new \RuntimeException('Failed to extract "contentStreamIdentifier" from event', 1646404169); } - return ContentStreamIdentifier::fromString($payload['contentStreamIdentifier']); + return ContentStreamId::fromString($payload['contentStreamIdentifier']); } private function dispatch(Severity $severity, string $message, mixed ...$args): void diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/ContentRepositoryMigrateCommandController.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/ContentRepositoryMigrateCommandController.php index 4381d0708cb..d2e1ce079b3 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/ContentRepositoryMigrateCommandController.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/ContentRepositoryMigrateCommandController.php @@ -18,7 +18,7 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception as DbalException; use Doctrine\DBAL\Exception\ConnectionException; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\LegacyNodeMigration\LegacyMigrationService; use Neos\ContentRepository\LegacyNodeMigration\LegacyMigrationServiceFactory; use Neos\ContentRepository\Core\Service\ContentRepositoryBootstrapper; @@ -115,7 +115,7 @@ public function runCommand(bool $verbose = false, string $config = null): void $this->siteRepository->add($site); $this->persistenceManager->persistAll(); - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString( + $contentRepositoryIdentifier = ContentRepositoryId::fromString( $site->getConfiguration()['contentRepository'] ?? throw new \RuntimeException('There is no content repository identifier configured in Sites configuration in Settings.yaml: Neos.Neos.sites.*.contentRepository') ); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/SerializedPropertyValuesAndReferences.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/SerializedPropertyValuesAndReferences.php index 9456981a2b1..5dc23430c02 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/SerializedPropertyValuesAndReferences.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/SerializedPropertyValuesAndReferences.php @@ -3,7 +3,7 @@ namespace Neos\ContentRepository\LegacyNodeMigration\Helpers; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\Flow\Annotations as Flow; /** @@ -13,7 +13,7 @@ final class SerializedPropertyValuesAndReferences { /** - * @param array $references + * @param array $references */ public function __construct( public readonly SerializedPropertyValues $serializedPropertyValues, diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregate.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregate.php index 3928a91d645..24e69c5e86f 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregate.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregate.php @@ -3,7 +3,7 @@ namespace Neos\ContentRepository\LegacyNodeMigration\Helpers; use Neos\ContentRepository\LegacyNodeMigration\Exception\MigrationException; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -21,12 +21,12 @@ final class VisitedNodeAggregate private array $variants = []; public function __construct( - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateIdentifier, public readonly NodeTypeName $nodeTypeName, ) {} - public function addVariant(OriginDimensionSpacePoint $originDimensionSpacePoint, NodeAggregateIdentifier $parentNodeAggregateIdentifier): void + public function addVariant(OriginDimensionSpacePoint $originDimensionSpacePoint, NodeAggregateId $parentNodeAggregateIdentifier): void { if (isset($this->variants[$originDimensionSpacePoint->hash])) { throw new MigrationException(sprintf('Node "%s" with dimension space point "%s" was already visited before', $this->nodeAggregateIdentifier, $originDimensionSpacePoint), 1653050442); diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregates.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregates.php index a4ecadabfb7..f12221e35e6 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregates.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeAggregates.php @@ -5,7 +5,7 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\DimensionSpace\InterDimensionalVariationGraph; use Neos\ContentRepository\LegacyNodeMigration\Exception\MigrationException; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; @@ -28,12 +28,12 @@ final class VisitedNodeAggregates */ private array $byNodeAggregateIdentifier = []; - public function addRootNode(NodeAggregateIdentifier $nodeAggregateIdentifier, NodeTypeName $nodeTypeName, NodePath $nodePath, DimensionSpacePointSet $allowedDimensionSubspace): void + public function addRootNode(NodeAggregateId $nodeAggregateIdentifier, NodeTypeName $nodeTypeName, NodePath $nodePath, DimensionSpacePointSet $allowedDimensionSubspace): void { - $this->add($nodeAggregateIdentifier, $allowedDimensionSubspace, $nodeTypeName, $nodePath, NodeAggregateIdentifier::fromString('00000000-0000-0000-0000-000000000000')); + $this->add($nodeAggregateIdentifier, $allowedDimensionSubspace, $nodeTypeName, $nodePath, NodeAggregateId::fromString('00000000-0000-0000-0000-000000000000')); } - public function add(NodeAggregateIdentifier $nodeAggregateIdentifier, DimensionSpacePointSet $coveredDimensionSpacePoints, NodeTypeName $nodeTypeName, NodePath $nodePath, NodeAggregateIdentifier $parentNodeAggregateIdentifier): void + public function add(NodeAggregateId $nodeAggregateIdentifier, DimensionSpacePointSet $coveredDimensionSpacePoints, NodeTypeName $nodeTypeName, NodePath $nodePath, NodeAggregateId $parentNodeAggregateIdentifier): void { $visitedNodeAggregate = $this->byNodeAggregateIdentifier[$nodeAggregateIdentifier->getValue()] ?? new VisitedNodeAggregate($nodeAggregateIdentifier, $nodeTypeName); if (!$nodeTypeName->equals($visitedNodeAggregate->nodeTypeName)) { @@ -50,12 +50,12 @@ public function add(NodeAggregateIdentifier $nodeAggregateIdentifier, DimensionS $this->byNodeAggregateIdentifier[$nodeAggregateIdentifier->getValue()] = $visitedNodeAggregate; } - public function containsNodeAggregate(NodeAggregateIdentifier $nodeAggregateIdentifier): bool + public function containsNodeAggregate(NodeAggregateId $nodeAggregateIdentifier): bool { return isset($this->byNodeAggregateIdentifier[$nodeAggregateIdentifier->getValue()]); } - public function getByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): VisitedNodeAggregate + public function getByNodeAggregateIdentifier(NodeAggregateId $nodeAggregateIdentifier): VisitedNodeAggregate { if (!isset($this->byNodeAggregateIdentifier[$nodeAggregateIdentifier->getValue()])) { throw new \InvalidArgumentException(sprintf('Node aggregate with id "%s" has not been visited before', $nodeAggregateIdentifier), 1655912733); @@ -63,7 +63,7 @@ public function getByNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggreg return $this->byNodeAggregateIdentifier[$nodeAggregateIdentifier->getValue()]; } - public function alreadyVisitedOriginDimensionSpacePoints(NodeAggregateIdentifier $nodeAggregateIdentifier): OriginDimensionSpacePointSet + public function alreadyVisitedOriginDimensionSpacePoints(NodeAggregateId $nodeAggregateIdentifier): OriginDimensionSpacePointSet { return isset($this->byNodeAggregateIdentifier[$nodeAggregateIdentifier->getValue()]) ? $this->byNodeAggregateIdentifier[$nodeAggregateIdentifier->getValue()]->getOriginDimensionSpacePoints() : OriginDimensionSpacePointSet::fromArray([]); } diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeVariant.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeVariant.php index a74c75aa0ed..b7f02b20c6b 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeVariant.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/Helpers/VisitedNodeVariant.php @@ -2,7 +2,7 @@ declare(strict_types=1); namespace Neos\ContentRepository\LegacyNodeMigration\Helpers; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\Flow\Annotations as Flow; @@ -14,6 +14,6 @@ final class VisitedNodeVariant public function __construct( public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, - public readonly NodeAggregateIdentifier $parentNodeAggregateIdentifier + public readonly NodeAggregateId $parentNodeAggregateIdentifier ) {} } diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationService.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationService.php index 408a0d6a4cd..f01bd618522 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationService.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationService.php @@ -30,7 +30,7 @@ use Neos\ContentRepository\Core\Infrastructure\Property\PropertyConverter; use Neos\ContentRepository\LegacyNodeMigration\Helpers\NodeDataLoader; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\EventStore\EventStoreInterface; use Neos\Flow\Persistence\PersistenceManagerInterface; use Neos\Flow\Property\PropertyMapper; @@ -57,7 +57,7 @@ public function __construct( private readonly EventNormalizer $eventNormalizer, private readonly PropertyConverter $propertyConverter, private readonly EventStoreInterface $eventStore, - private readonly ContentStreamIdentifier $contentStreamIdentifier, + private readonly ContentStreamId $contentStreamIdentifier, ) { } diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationServiceFactory.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationServiceFactory.php index 9dbe725d10b..05b7818b93e 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationServiceFactory.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/LegacyMigrationServiceFactory.php @@ -17,7 +17,7 @@ use Doctrine\DBAL\Connection; use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceFactoryDependencies; use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceFactoryInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\Flow\Persistence\PersistenceManagerInterface; use Neos\Flow\Property\PropertyMapper; use Neos\Flow\ResourceManagement\ResourceManager; @@ -40,7 +40,7 @@ public function __construct( private readonly ResourceRepository $resourceRepository, private readonly ResourceManager $resourceManager, private readonly PropertyMapper $propertyMapper, - private readonly ContentStreamIdentifier $contentStreamIdentifier, + private readonly ContentStreamId $contentStreamIdentifier, ) { } diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php index 9948779a770..8b609251004 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php @@ -36,8 +36,8 @@ use Neos\ContentRepository\LegacyNodeMigration\Helpers\VisitedNodeAggregate; use Neos\ContentRepository\LegacyNodeMigration\Helpers\VisitedNodeAggregates; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; @@ -46,8 +46,8 @@ use Neos\ContentRepository\Core\NodeType\NodeType; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\Flow\Persistence\Doctrine\DataTypes\JsonArrayType; use Neos\Flow\Property\PropertyMapper; use Ramsey\Uuid\Uuid; @@ -57,7 +57,7 @@ final class NodeDataToEventsProcessor implements ProcessorInterface { private NodeTypeName $sitesNodeTypeName; - private ContentStreamIdentifier $contentStreamIdentifier; + private ContentStreamId $contentStreamIdentifier; private VisitedNodeAggregates $visitedNodes; /** @@ -84,11 +84,11 @@ public function __construct( private readonly iterable $nodeDataRows, ) { $this->sitesNodeTypeName = NodeTypeName::fromString('Neos.Neos:Sites'); - $this->contentStreamIdentifier = ContentStreamIdentifier::create(); + $this->contentStreamIdentifier = ContentStreamId::create(); $this->visitedNodes = new VisitedNodeAggregates(); } - public function setContentStreamIdentifier(ContentStreamIdentifier $contentStreamIdentifier): void + public function setContentStreamIdentifier(ContentStreamId $contentStreamIdentifier): void { $this->contentStreamIdentifier = $contentStreamIdentifier; } @@ -109,9 +109,9 @@ public function run(): ProcessorResult foreach ($this->nodeDataRows as $nodeDataRow) { if ($nodeDataRow['path'] === '/sites') { - $sitesNodeAggregateIdentifier = NodeAggregateIdentifier::fromString($nodeDataRow['identifier']); + $sitesNodeAggregateIdentifier = NodeAggregateId::fromString($nodeDataRow['identifier']); $this->visitedNodes->addRootNode($sitesNodeAggregateIdentifier, $this->sitesNodeTypeName, NodePath::fromString('/sites'), $this->interDimensionalVariationGraph->getDimensionSpacePoints()); - $this->exportEvent(new RootNodeAggregateWithNodeWasCreated($this->contentStreamIdentifier, $sitesNodeAggregateIdentifier, $this->sitesNodeTypeName, $this->interDimensionalVariationGraph->getDimensionSpacePoints(), NodeAggregateClassification::CLASSIFICATION_ROOT, UserIdentifier::forSystemUser())); + $this->exportEvent(new RootNodeAggregateWithNodeWasCreated($this->contentStreamIdentifier, $sitesNodeAggregateIdentifier, $this->sitesNodeTypeName, $this->interDimensionalVariationGraph->getDimensionSpacePoints(), NodeAggregateClassification::CLASSIFICATION_ROOT, UserId::forSystemUser())); continue; } if ($this->metaDataExported === false && $nodeDataRow['parentpath'] === '/sites') { @@ -180,7 +180,7 @@ private function exportMetaData(array $nodeDataRow): void */ private function processNodeData(array $nodeDataRow): void { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($nodeDataRow['identifier']); + $nodeAggregateIdentifier = NodeAggregateId::fromString($nodeDataRow['identifier']); $nodePath = NodePath::fromString(strtolower($nodeDataRow['path'])); try { $dimensionArray = json_decode($nodeDataRow['dimensionvalues'], true, 512, JSON_THROW_ON_ERROR); @@ -203,20 +203,20 @@ private function processNodeData(array $nodeDataRow): void // Create tethered node if the node was not found before. // If the node was already visited, we want to create a node variant (and keep the tethering status) $specializations = $this->interDimensionalVariationGraph->getSpecializationSet($originDimensionSpacePoint->toDimensionSpacePoint(), true, $this->visitedNodes->alreadyVisitedOriginDimensionSpacePoints($nodeAggregateIdentifier)->toDimensionSpacePointSet()); - $this->exportEvent(new NodeAggregateWithNodeWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $nodeTypeName, $originDimensionSpacePoint, $specializations, $parentNodeAggregate->nodeAggregateIdentifier, $nodeName, $serializedPropertyValuesAndReferences->serializedPropertyValues, NodeAggregateClassification::CLASSIFICATION_TETHERED, UserIdentifier::forSystemUser(), null)); + $this->exportEvent(new NodeAggregateWithNodeWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $nodeTypeName, $originDimensionSpacePoint, $specializations, $parentNodeAggregate->nodeAggregateIdentifier, $nodeName, $serializedPropertyValuesAndReferences->serializedPropertyValues, NodeAggregateClassification::CLASSIFICATION_TETHERED, UserId::forSystemUser(), null)); } elseif ($this->visitedNodes->containsNodeAggregate($nodeAggregateIdentifier)) { // Create node variant, BOTH for tethered and regular nodes $this->createNodeVariant($nodeAggregateIdentifier, $originDimensionSpacePoint, $serializedPropertyValuesAndReferences, $parentNodeAggregate); } else { // create node aggregate - $this->exportEvent( new NodeAggregateWithNodeWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $nodeTypeName, $originDimensionSpacePoint, $this->interDimensionalVariationGraph->getSpecializationSet($originDimensionSpacePoint->toDimensionSpacePoint()), $parentNodeAggregate->nodeAggregateIdentifier, $nodeName, $serializedPropertyValuesAndReferences->serializedPropertyValues, NodeAggregateClassification::CLASSIFICATION_REGULAR, UserIdentifier::forSystemUser(), null)); + $this->exportEvent( new NodeAggregateWithNodeWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $nodeTypeName, $originDimensionSpacePoint, $this->interDimensionalVariationGraph->getSpecializationSet($originDimensionSpacePoint->toDimensionSpacePoint()), $parentNodeAggregate->nodeAggregateIdentifier, $nodeName, $serializedPropertyValuesAndReferences->serializedPropertyValues, NodeAggregateClassification::CLASSIFICATION_REGULAR, UserId::forSystemUser(), null)); } // nodes are hidden via NodeAggregateWasDisabled event if ($nodeDataRow['hidden']) { - $this->exportEvent( new NodeAggregateWasDisabled($this->contentStreamIdentifier, $nodeAggregateIdentifier, $this->interDimensionalVariationGraph->getSpecializationSet($originDimensionSpacePoint->toDimensionSpacePoint(), true, $this->visitedNodes->alreadyVisitedOriginDimensionSpacePoints($nodeAggregateIdentifier)->toDimensionSpacePointSet()), UserIdentifier::forSystemUser())); + $this->exportEvent( new NodeAggregateWasDisabled($this->contentStreamIdentifier, $nodeAggregateIdentifier, $this->interDimensionalVariationGraph->getSpecializationSet($originDimensionSpacePoint->toDimensionSpacePoint(), true, $this->visitedNodes->alreadyVisitedOriginDimensionSpacePoints($nodeAggregateIdentifier)->toDimensionSpacePointSet()), UserId::forSystemUser())); } foreach ($serializedPropertyValuesAndReferences->references as $referencePropertyName => $destinationNodeAggregateIdentifiers) { - $this->nodeReferencesWereSetEvents[] = new NodeReferencesWereSet($this->contentStreamIdentifier, $nodeAggregateIdentifier, new OriginDimensionSpacePointSet([$originDimensionSpacePoint]), PropertyName::fromString($referencePropertyName), SerializedNodeReferences::fromNodeAggregateIdentifiers($destinationNodeAggregateIdentifiers), UserIdentifier::forSystemUser()); + $this->nodeReferencesWereSetEvents[] = new NodeReferencesWereSet($this->contentStreamIdentifier, $nodeAggregateIdentifier, new OriginDimensionSpacePointSet([$originDimensionSpacePoint]), PropertyName::fromString($referencePropertyName), SerializedNodeReferences::fromNodeAggregateIds($destinationNodeAggregateIdentifiers), UserId::forSystemUser()); } $this->visitedNodes->add($nodeAggregateIdentifier, new DimensionSpacePointSet([$originDimensionSpacePoint->toDimensionSpacePoint()]), $nodeTypeName, $nodePath, $parentNodeAggregate->nodeAggregateIdentifier); @@ -241,7 +241,7 @@ public function extractPropertyValuesAndReferences(array $nodeDataRow, NodeType if (!is_array($propertyValue)) { $propertyValue = [$propertyValue]; } - $references[$propertyName] = NodeAggregateIdentifiers::fromArray(array_map(static fn (string $identifier) => NodeAggregateIdentifier::fromString($identifier), $propertyValue)); + $references[$propertyName] = NodeAggregateIds::fromArray(array_map(static fn (string $identifier) => NodeAggregateId::fromString($identifier), $propertyValue)); } continue; } @@ -270,7 +270,7 @@ public function extractPropertyValuesAndReferences(array $nodeDataRow, NodeType * NOTE: We prioritize specializations/generalizations over peer variants ("ch" creates a specialization variant of "de" rather than a peer of "en" if both has been seen before). * For that reason we loop over all previously visited dimension space points until we encounter a specialization/generalization. Otherwise, the last NodePeerVariantWasCreated will be used */ - private function createNodeVariant(NodeAggregateIdentifier $nodeAggregateIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint, SerializedPropertyValuesAndReferences $serializedPropertyValuesAndReferences, VisitedNodeAggregate $parentNodeAggregate): void + private function createNodeVariant(NodeAggregateId $nodeAggregateIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint, SerializedPropertyValuesAndReferences $serializedPropertyValuesAndReferences, VisitedNodeAggregate $parentNodeAggregate): void { $alreadyVisitedOriginDimensionSpacePoints = $this->visitedNodes->alreadyVisitedOriginDimensionSpacePoints($nodeAggregateIdentifier); $coveredDimensionSpacePoints = $this->interDimensionalVariationGraph->getSpecializationSet($originDimensionSpacePoint->toDimensionSpacePoint(), true, $alreadyVisitedOriginDimensionSpacePoints->toDimensionSpacePointSet()); @@ -279,9 +279,9 @@ private function createNodeVariant(NodeAggregateIdentifier $nodeAggregateIdentif foreach ($alreadyVisitedOriginDimensionSpacePoints as $alreadyVisitedOriginDimensionSpacePoint) { $variantType = $this->interDimensionalVariationGraph->getVariantType($originDimensionSpacePoint->toDimensionSpacePoint(), $alreadyVisitedOriginDimensionSpacePoint->toDimensionSpacePoint()); $variantCreatedEvent = match ($variantType) { - VariantType::TYPE_SPECIALIZATION => new NodeSpecializationVariantWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $alreadyVisitedOriginDimensionSpacePoint, $originDimensionSpacePoint, $coveredDimensionSpacePoints, UserIdentifier::forSystemUser()), - VariantType::TYPE_GENERALIZATION => new NodeGeneralizationVariantWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $alreadyVisitedOriginDimensionSpacePoint, $originDimensionSpacePoint, $coveredDimensionSpacePoints, UserIdentifier::forSystemUser()), - VariantType::TYPE_PEER => new NodePeerVariantWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $alreadyVisitedOriginDimensionSpacePoint, $originDimensionSpacePoint, $coveredDimensionSpacePoints, UserIdentifier::forSystemUser()), + VariantType::TYPE_SPECIALIZATION => new NodeSpecializationVariantWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $alreadyVisitedOriginDimensionSpacePoint, $originDimensionSpacePoint, $coveredDimensionSpacePoints, UserId::forSystemUser()), + VariantType::TYPE_GENERALIZATION => new NodeGeneralizationVariantWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $alreadyVisitedOriginDimensionSpacePoint, $originDimensionSpacePoint, $coveredDimensionSpacePoints, UserId::forSystemUser()), + VariantType::TYPE_PEER => new NodePeerVariantWasCreated($this->contentStreamIdentifier, $nodeAggregateIdentifier, $alreadyVisitedOriginDimensionSpacePoint, $originDimensionSpacePoint, $coveredDimensionSpacePoints, UserId::forSystemUser()), VariantType::TYPE_SAME => null, }; $variantSourceOriginDimensionSpacePoint = $alreadyVisitedOriginDimensionSpacePoint; @@ -294,7 +294,7 @@ private function createNodeVariant(NodeAggregateIdentifier $nodeAggregateIdentif } $this->exportEvent($variantCreatedEvent); if ($serializedPropertyValuesAndReferences->serializedPropertyValues->count() > 0) { - $this->exportEvent(new NodePropertiesWereSet($this->contentStreamIdentifier, $nodeAggregateIdentifier, $originDimensionSpacePoint, $serializedPropertyValuesAndReferences->serializedPropertyValues, UserIdentifier::forSystemUser())); + $this->exportEvent(new NodePropertiesWereSet($this->contentStreamIdentifier, $nodeAggregateIdentifier, $originDimensionSpacePoint, $serializedPropertyValuesAndReferences->serializedPropertyValues, UserId::forSystemUser())); } // When we specialize/generalize, we create a node variant at exactly the same tree location as the source node // If the parent node aggregate id differs, we need to move the just created variant to the new location @@ -311,7 +311,7 @@ private function createNodeVariant(NodeAggregateIdentifier $nodeAggregateIdentif ) ]), new DimensionSpacePointSet([]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() )); } } diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php index 2accea03470..8b7bf693c04 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php @@ -27,9 +27,9 @@ use Neos\ContentRepository\LegacyNodeMigration\Helpers\EventExporter; use Neos\ContentRepository\LegacyNodeMigration\NodeDataToAssetsProcessor; use Neos\ContentRepository\LegacyNodeMigration\NodeDataToEventsProcessor; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Tests\Behavior\Features\Bootstrap\NodeOperationsTrait; use Neos\EventSourcing\EventStore\EventNormalizer; use Neos\Flow\Property\PropertyMapper; @@ -87,7 +87,7 @@ public function iHaveTheFollowingNodeDataRows(TableNode $nodeDataRows): void return [ 'path' => $row['Path'], 'parentpath' => implode('/', array_slice(explode('/', $row['Path']), 0, -1)) ?: '/', - 'identifier' => $row['Identifier'] ?? (string)NodeAggregateIdentifier::create(), + 'identifier' => $row['Identifier'] ?? (string)NodeAggregateId::create(), 'nodetype' => $row['Node Type'] ?? 'unstructured', 'properties' => !empty($row['Properties']) ? $row['Properties'] : '{}', 'dimensionvalues' => !empty($row['Dimension Values']) ? $row['Dimension Values'] : '{}', @@ -113,7 +113,7 @@ public function iRunTheEventMigration(string $contentStream = null): void $eventNormalizer = $this->getObjectManager()->get(EventNormalizer::class); $migration = new NodeDataToEventsProcessor($nodeTypeManager, $propertyMapper, $propertyConverter, $interDimensionalVariationGraph, $eventNormalizer, $this->mockFilesystem, $this->nodeDataRows); if ($contentStream !== null) { - $migration->setContentStreamIdentifier(ContentStreamIdentifier::fromString($contentStream)); + $migration->setContentStreamIdentifier(ContentStreamId::fromString($contentStream)); } $this->lastMigrationResult = $migration->run(); } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ChildrenOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ChildrenOperation.php index 4396b01ed6b..3d087a02720 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ChildrenOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ChildrenOperation.php @@ -83,11 +83,11 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) /** @var Node $contextNode */ foreach ($flowQuery->getContext() as $contextNode) { $childNodes = $this->contentRepositoryRegistry->subgraphForNode($contextNode) - ->findChildNodes($contextNode->nodeAggregateIdentifier); + ->findChildNodes($contextNode->nodeAggregateId); foreach ($childNodes as $childNode) { - if (!isset($outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateIdentifier])) { + if (!isset($outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateId])) { $output[] = $childNode; - $outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateIdentifier] = true; + $outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateId] = true; } } } @@ -144,16 +144,16 @@ protected function earlyOptimizationOfFilters(FlowQuery $flowQuery, array $parse while (($nodePathSegment = array_shift($currentPathSegments)) && !is_null($resolvedNode)) { $resolvedNode = $this->contentRepositoryRegistry->subgraphForNode($resolvedNode) ->findChildNodeConnectedThroughEdgeName( - $resolvedNode->nodeAggregateIdentifier, + $resolvedNode->nodeAggregateId, NodeName::fromString($nodePathSegment) ); } if (!is_null($resolvedNode) && !isset($filteredOutputNodeIdentifiers[ - (string)$resolvedNode->nodeAggregateIdentifier + (string)$resolvedNode->nodeAggregateId ])) { $filteredOutput[] = $resolvedNode; - $filteredOutputNodeIdentifiers[(string)$resolvedNode->nodeAggregateIdentifier] = true; + $filteredOutputNodeIdentifiers[(string)$resolvedNode->nodeAggregateId] = true; } } } elseif (count($instanceOfFilters) > 0) { @@ -163,10 +163,10 @@ protected function earlyOptimizationOfFilters(FlowQuery $flowQuery, array $parse }, $instanceOfFilters); /** @var Node $contextNode */ foreach ($flowQuery->getContext() as $contextNode) { - $contentRepository = $this->contentRepositoryRegistry->get($contextNode->subgraphIdentity->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($contextNode->subgraphIdentity->contentRepositoryId); $childNodes = $this->contentRepositoryRegistry->subgraphForNode($contextNode) ->findChildNodes( - $contextNode->nodeAggregateIdentifier, + $contextNode->nodeAggregateId, NodeTypeConstraints::create( NodeTypeNames::fromStringArray($allowedNodeTypes), NodeTypeNames::createEmpty() @@ -175,10 +175,10 @@ protected function earlyOptimizationOfFilters(FlowQuery $flowQuery, array $parse foreach ($childNodes as $childNode) { if (!isset($filteredOutputNodeIdentifiers[ - (string)$childNode->nodeAggregateIdentifier + (string)$childNode->nodeAggregateId ])) { $filteredOutput[] = $childNode; - $filteredOutputNodeIdentifiers[(string)$childNode->nodeAggregateIdentifier] = true; + $filteredOutputNodeIdentifiers[(string)$childNode->nodeAggregateId] = true; } } } @@ -199,7 +199,7 @@ protected function earlyOptimizationOfFilters(FlowQuery $flowQuery, array $parse // Add filtered nodes to output foreach ($filteredOutput as $filteredNode) { - if (!isset($outputNodeAggregateIdentifiers[(string)$filteredNode->nodeAggregateIdentifier])) { + if (!isset($outputNodeAggregateIdentifiers[(string)$filteredNode->nodeAggregateId])) { $output[] = $filteredNode; } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ClosestOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ClosestOperation.php index ad1a28722f9..8b032c2b71c 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ClosestOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ClosestOperation.php @@ -75,7 +75,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) foreach ($contextNodeQuery as $result) { /* @var Node $result */ - $output[(string)$result->nodeAggregateIdentifier] = $result; + $output[(string)$result->nodeAggregateId] = $result; } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php index 5e71b0bcade..3fc4829f0aa 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php @@ -104,7 +104,7 @@ protected function matchesPropertyNameFilter($element, $propertyNameFilter) */ protected function matchesIdentifierFilter($element, $identifier) { - return (strtolower((string)$element->nodeAggregateIdentifier) === strtolower($identifier)); + return (strtolower((string)$element->nodeAggregateId) === strtolower($identifier)); } /** diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FindOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FindOperation.php index 2be9e33fa50..fd4df5b1a91 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FindOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FindOperation.php @@ -14,7 +14,7 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeConstraintParser; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -128,14 +128,14 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void /** @todo fetch them $elsewhere (fusion runtime?) */ $firstContextNode = reset($contextNodes); assert($firstContextNode instanceof Node); - $contentRepository = $this->contentRepositoryRegistry->get($firstContextNode->subgraphIdentity->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($firstContextNode->subgraphIdentity->contentRepositoryId); $entryPoints = $this->getEntryPoints($contextNodes); foreach ($parsedFilter['Filters'] as $filter) { $filterResults = []; $generatedNodes = false; if (isset($filter['IdentifierFilter'])) { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($filter['IdentifierFilter']); + $nodeAggregateIdentifier = NodeAggregateId::fromString($filter['IdentifierFilter']); $filterResults = $this->addNodesByIdentifier($nodeAggregateIdentifier, $entryPoints, $filterResults); $generatedNodes = true; } elseif (isset($filter['PropertyNameFilter']) || isset($filter['PathFilter'])) { @@ -171,9 +171,9 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void $usedKeys = []; foreach ($result as $item) { $identifier = (string) new NodeAddress( - $item->subgraphIdentity->contentStreamIdentifier, + $item->subgraphIdentity->contentStreamId, $item->subgraphIdentity->dimensionSpacePoint, - $item->nodeAggregateIdentifier, + $item->nodeAggregateId, null ); if (!isset($usedKeys[$identifier])) { @@ -214,14 +214,14 @@ protected function getEntryPoints(array $contextNodes): array * @return array */ protected function addNodesByIdentifier( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, array $entryPoints, array $result ): array { foreach ($entryPoints as $entryPoint) { /** @var ContentSubgraphInterface $subgraph */ $subgraph = $entryPoint['subgraph']; - $nodeByIdentifier = $subgraph->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier); + $nodeByIdentifier = $subgraph->findNodeByNodeAggregateId($nodeAggregateIdentifier); if ($nodeByIdentifier) { $result[] = $nodeByIdentifier; } @@ -245,13 +245,13 @@ protected function addNodesByPath(NodePath $nodePath, array $entryPoints, array if ($nodePath->isAbsolute()) { $rootNode = $node; while ($rootNode instanceof Node && !$rootNode->classification->isRoot()) { - $rootNode = $subgraph->findParentNode($rootNode->nodeAggregateIdentifier); + $rootNode = $subgraph->findParentNode($rootNode->nodeAggregateId); } if ($rootNode instanceof Node) { - $nodeByPath = $subgraph->findNodeByPath($nodePath, $rootNode->nodeAggregateIdentifier); + $nodeByPath = $subgraph->findNodeByPath($nodePath, $rootNode->nodeAggregateId); } } else { - $nodeByPath = $subgraph->findNodeByPath($nodePath, $node->nodeAggregateIdentifier); + $nodeByPath = $subgraph->findNodeByPath($nodePath, $node->nodeAggregateId); } if (isset($nodeByPath)) { $result[] = $nodeByPath; diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/HasOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/HasOperation.php index aa8f39b6090..bf522838cbd 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/HasOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/HasOperation.php @@ -100,7 +100,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) foreach ($elements as $element) { if ($element instanceof Node) { $parent = $this->contentRepositoryRegistry->subgraphForNode($element) - ->findParentNode($element->nodeAggregateIdentifier); + ->findParentNode($element->nodeAggregateId); if (!is_null($parent)) { foreach ($context as $contextElement) { /** @var Node $contextElement */ diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextAllOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextAllOperation.php index a12aac4e4fd..9e52118b2af 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextAllOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextAllOperation.php @@ -69,8 +69,8 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) $outputNodePaths = []; foreach ($flowQuery->getContext() as $contextNode) { foreach ($this->getNextForNode($contextNode) as $nextNode) { - if ($nextNode !== null && !isset($outputNodePaths[(string)$nextNode->nodeAggregateIdentifier])) { - $outputNodePaths[(string)$nextNode->nodeAggregateIdentifier] = true; + if ($nextNode !== null && !isset($outputNodePaths[(string)$nextNode->nodeAggregateId])) { + $outputNodePaths[(string)$nextNode->nodeAggregateId] = true; $output[] = $nextNode; } } @@ -90,11 +90,11 @@ protected function getNextForNode(Node $contextNode): Nodes { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($contextNode); - $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { return Nodes::createEmpty(); } - return $subgraph->findChildNodes($parentNode->nodeAggregateIdentifier)->nextAll($contextNode); + return $subgraph->findChildNodes($parentNode->nodeAggregateId)->nextAll($contextNode); } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextOperation.php index a97fb414287..17f9f301238 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextOperation.php @@ -69,8 +69,8 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) $outputNodePaths = []; foreach ($flowQuery->getContext() as $contextNode) { $nextNode = $this->getNextForNode($contextNode); - if ($nextNode !== null && !isset($outputNodePaths[(string)$nextNode->nodeAggregateIdentifier])) { - $outputNodePaths[(string)$nextNode->nodeAggregateIdentifier] = true; + if ($nextNode !== null && !isset($outputNodePaths[(string)$nextNode->nodeAggregateId])) { + $outputNodePaths[(string)$nextNode->nodeAggregateId] = true; $output[] = $nextNode; } } @@ -89,11 +89,11 @@ protected function getNextForNode(Node $contextNode): ?Node { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($contextNode); - $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { return null; } - return $subgraph->findChildNodes($parentNode->nodeAggregateIdentifier)->next($contextNode); + return $subgraph->findChildNodes($parentNode->nodeAggregateId)->next($contextNode); } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextUntilOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextUntilOperation.php index ab3849a5c27..03480b8350b 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextUntilOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/NextUntilOperation.php @@ -87,8 +87,8 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) foreach ($nextNodes as $nextNode) { if ($nextNode !== null - && !isset($outputNodeIdentifiers[(string)$nextNode->nodeAggregateIdentifier])) { - $outputNodeIdentifiers[(string)$nextNode->nodeAggregateIdentifier] = true; + && !isset($outputNodeIdentifiers[(string)$nextNode->nodeAggregateId])) { + $outputNodeIdentifiers[(string)$nextNode->nodeAggregateId] = true; $output[] = $nextNode; } } @@ -109,11 +109,11 @@ protected function getNextForNode(Node $contextNode): Nodes { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($contextNode); - $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { return Nodes::createEmpty(); } - return $subgraph->findChildNodes($parentNode->nodeAggregateIdentifier)->nextAll($contextNode); + return $subgraph->findChildNodes($parentNode->nodeAggregateId)->nextAll($contextNode); } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentOperation.php index 5859e94fa4e..746d4fb47c8 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentOperation.php @@ -69,14 +69,14 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) foreach ($flowQuery->getContext() as $contextNode) { /* @var $contextNode Node */ $parentNode = $this->contentRepositoryRegistry->subgraphForNode($contextNode) - ->findParentNode($contextNode->nodeAggregateIdentifier); + ->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { continue; } - if (!isset($outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateIdentifier])) { + if (!isset($outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateId])) { $output[] = $parentNode; - $outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateIdentifier] = true; + $outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateId] = true; } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsOperation.php index 6168a7a54b8..dcf0d4233c3 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsOperation.php @@ -72,7 +72,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) $node = $contextNode; do { $node = $this->contentRepositoryRegistry->subgraphForNode($node) - ->findParentNode($node->nodeAggregateIdentifier); + ->findParentNode($node->nodeAggregateId); if ($node === null) { // no parent found break; diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsUntilOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsUntilOperation.php index 905b434a9b2..bbe1aac066a 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsUntilOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/ParentsUntilOperation.php @@ -83,8 +83,8 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) foreach ($parentNodes as $parentNode) { if ($parentNode !== null - && !isset($outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateIdentifier])) { - $outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateIdentifier] = true; + && !isset($outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateId])) { + $outputNodeAggregateIdentifiers[(string)$parentNode->nodeAggregateId] = true; $output[] = $parentNode; } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevAllOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevAllOperation.php index 26e0c488ba7..0f21c4897d9 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevAllOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevAllOperation.php @@ -70,9 +70,9 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) foreach ($flowQuery->getContext() as $contextNode) { foreach ($this->getPrevForNode($contextNode) as $prevNode) { if ($prevNode !== null - && !isset($outputNodeAggregateIdentifiers[(string)$prevNode->nodeAggregateIdentifier]) + && !isset($outputNodeAggregateIdentifiers[(string)$prevNode->nodeAggregateId]) ) { - $outputNodeAggregateIdentifiers[(string)$prevNode->nodeAggregateIdentifier] = true; + $outputNodeAggregateIdentifiers[(string)$prevNode->nodeAggregateId] = true; $output[] = $prevNode; } } @@ -91,11 +91,11 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) protected function getPrevForNode(Node $contextNode): Nodes { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($contextNode); - $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { return Nodes::createEmpty(); } - return $subgraph->findChildNodes($parentNode->nodeAggregateIdentifier)->previousAll($contextNode); + return $subgraph->findChildNodes($parentNode->nodeAggregateId)->previousAll($contextNode); } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevOperation.php index 87c83a6b800..e00d0e2038c 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevOperation.php @@ -68,8 +68,8 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void $outputNodePaths = []; foreach ($flowQuery->getContext() as $contextNode) { $nextNode = $this->getPrevForNode($contextNode); - if ($nextNode !== null && !isset($outputNodePaths[(string)$nextNode->nodeAggregateIdentifier])) { - $outputNodePaths[(string)$nextNode->nodeAggregateIdentifier] = true; + if ($nextNode !== null && !isset($outputNodePaths[(string)$nextNode->nodeAggregateId])) { + $outputNodePaths[(string)$nextNode->nodeAggregateId] = true; $output[] = $nextNode; } } @@ -87,11 +87,11 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void protected function getPrevForNode(Node $contextNode): ?Node { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($contextNode); - $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { return null; } - return $subgraph->findChildNodes($parentNode->nodeAggregateIdentifier)->previous($contextNode); + return $subgraph->findChildNodes($parentNode->nodeAggregateId)->previous($contextNode); } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevUntilOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevUntilOperation.php index a5290b2f9e8..081a8776dee 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevUntilOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PrevUntilOperation.php @@ -87,8 +87,8 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void foreach ($prevNodes as $prevNode) { if ($prevNode !== null && - !isset($outputNodeIdentifiers[(string)$prevNode->nodeAggregateIdentifier])) { - $outputNodeIdentifiers[(string)$prevNode->nodeAggregateIdentifier] = true; + !isset($outputNodeIdentifiers[(string)$prevNode->nodeAggregateId])) { + $outputNodeIdentifiers[(string)$prevNode->nodeAggregateId] = true; $output[] = $prevNode; } } @@ -108,11 +108,11 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void protected function getPrevForNode(Node $contextNode): Nodes { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($contextNode); - $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { return Nodes::createEmpty(); } - return $subgraph->findChildNodes($parentNode->nodeAggregateIdentifier)->previousAll($contextNode); + return $subgraph->findChildNodes($parentNode->nodeAggregateId)->previousAll($contextNode); } } diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php index aadc893b5e8..036c2633ee3 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php @@ -92,20 +92,20 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) $element = $context[0]; $subgraph = $this->contentRepositoryRegistry->subgraphForNode($element); if ($propertyPath === '_path') { - return (string)$subgraph->findNodePath($element->nodeAggregateIdentifier); + return (string)$subgraph->findNodePath($element->nodeAggregateId); } elseif ($propertyPath[0] === '_') { return ObjectAccess::getPropertyPath($element, substr($propertyPath, 1)); } else { if ($element->nodeType->getPropertyType($propertyPath) === 'reference') { return ( $subgraph->findReferencedNodes( - $element->nodeAggregateIdentifier, + $element->nodeAggregateId, PropertyName::fromString($propertyPath) )[0] ?? null )?->node; } elseif ($element->nodeType->getPropertyType($propertyPath) === 'references') { return $subgraph->findReferencedNodes( - $element->nodeAggregateIdentifier, + $element->nodeAggregateId, PropertyName::fromString($propertyPath) )->getNodes(); } else { diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SiblingsOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SiblingsOperation.php index fef94d7130b..f2df46c8d89 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SiblingsOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SiblingsOperation.php @@ -67,22 +67,22 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void $outputNodeAggregateIdentifiers = []; foreach ($flowQuery->getContext() as $contextNode) { /** @var Node $contextNode */ - $outputNodeAggregateIdentifiers[(string)$contextNode->nodeAggregateIdentifier] = true; + $outputNodeAggregateIdentifiers[(string)$contextNode->nodeAggregateId] = true; } foreach ($flowQuery->getContext() as $contextNode) { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($contextNode); - $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($contextNode->nodeAggregateId); if ($parentNode === null) { // no parent found continue; } - foreach ($subgraph->findChildNodes($parentNode->nodeAggregateIdentifier) as $childNode) { - if (!isset($outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateIdentifier])) { + foreach ($subgraph->findChildNodes($parentNode->nodeAggregateId) as $childNode) { + if (!isset($outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateId])) { $output[] = $childNode; - $outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateIdentifier] = true; + $outputNodeAggregateIdentifiers[(string)$childNode->nodeAggregateId] = true; } } } diff --git a/Neos.ContentRepository.NodeAccess/Tests/Unit/FlowQueryOperations/AbstractQueryOperationsTest.php b/Neos.ContentRepository.NodeAccess/Tests/Unit/FlowQueryOperations/AbstractQueryOperationsTest.php index bbb3802ffb2..a24f1c2a0e2 100644 --- a/Neos.ContentRepository.NodeAccess/Tests/Unit/FlowQueryOperations/AbstractQueryOperationsTest.php +++ b/Neos.ContentRepository.NodeAccess/Tests/Unit/FlowQueryOperations/AbstractQueryOperationsTest.php @@ -12,7 +12,7 @@ */ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Flow\Tests\UnitTestCase; use PHPUnit\Framework\MockObject\MockObject; @@ -25,7 +25,7 @@ protected function mockNode(string $nodeAggregateIdentifier): Node { /** @var Node|MockObject $mockNode */ $mockNode = $this->getMockBuilder(Node::class)->getMock(); - $mockNode->method('getNodeAggregateIdentifier')->willReturn(NodeAggregateIdentifier::fromString($nodeAggregateIdentifier)); + $mockNode->method('getNodeAggregateIdentifier')->willReturn(NodeAggregateId::fromString($nodeAggregateIdentifier)); $mockNode->method('equals')->willReturnCallback(function (Node $other) use ($mockNode) { return $other === $mockNode; }); diff --git a/Neos.ContentRepository.NodeMigration/src/Command/ExecuteMigration.php b/Neos.ContentRepository.NodeMigration/src/Command/ExecuteMigration.php index 699ff955ffb..f6cfa570443 100644 --- a/Neos.ContentRepository.NodeMigration/src/Command/ExecuteMigration.php +++ b/Neos.ContentRepository.NodeMigration/src/Command/ExecuteMigration.php @@ -14,7 +14,7 @@ namespace Neos\ContentRepository\NodeMigration\Command; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -49,7 +49,7 @@ final class ExecuteMigration * * This effectively makes all changes of the first submigration visible in the next submigration. * - * @var ContentStreamIdentifier[] + * @var ContentStreamId[] */ private $contentStreamIdentifiersForWriting; @@ -57,7 +57,7 @@ final class ExecuteMigration * ExecuteMigration constructor. * @param MigrationConfiguration $migrationConfiguration * @param WorkspaceName $workspaceName - * @param ContentStreamIdentifier[] $contentStreamIdentifiersForWriting + * @param ContentStreamId[] $contentStreamIdentifiersForWriting */ public function __construct( MigrationConfiguration $migrationConfiguration, @@ -85,12 +85,12 @@ public function getWorkspaceName(): WorkspaceName return $this->workspaceName; } - public function getOrCreateContentStreamIdentifierForWriting(int $index): ContentStreamIdentifier + public function getOrCreateContentStreamIdentifierForWriting(int $index): ContentStreamId { if (isset($this->contentStreamIdentifiersForWriting[$index])) { return $this->contentStreamIdentifiersForWriting[$index]; } - return ContentStreamIdentifier::create(); + return ContentStreamId::create(); } } diff --git a/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php b/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php index d22b65e7ac6..e7f321fd461 100644 --- a/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php +++ b/Neos.ContentRepository.NodeMigration/src/NodeMigrationService.php @@ -7,14 +7,14 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\NodeMigration\Filter\InvalidMigrationFilterSpecified; use Neos\ContentRepository\NodeMigration\Command\ExecuteMigration; use Neos\ContentRepository\NodeMigration\Filter\FiltersFactory; use Neos\ContentRepository\NodeMigration\Transformation\TransformationsFactory; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateWorkspace; use Neos\ContentRepository\Core\SharedModel\Exception\WorkspaceDoesNotExist; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -76,14 +76,14 @@ public function executeMigration(ExecuteMigration $command): void $workspace->workspaceName, WorkspaceTitle::fromString($contentStreamForWriting->jsonSerialize()), WorkspaceDescription::fromString(''), - UserIdentifier::forSystemUser(), + UserId::forSystemUser(), $contentStreamForWriting, ) )->block(); /** array $migrationDescription */ $this->executeSubMigrationAndBlock( $migrationDescription, - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, $contentStreamForWriting ); } @@ -97,8 +97,8 @@ public function executeMigration(ExecuteMigration $command): void */ protected function executeSubMigrationAndBlock( array $migrationDescription, - ContentStreamIdentifier $contentStreamForReading, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForReading, + ContentStreamId $contentStreamForWriting ): void { $filters = $this->filterFactory->buildFilterConjunction($migrationDescription['filters'] ?? []); diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php index 35fcdb656dd..ca215ab29df 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/AddDimensionShineThroughTransformationFactory.php @@ -18,7 +18,7 @@ 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\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Add a Dimension Space Point Shine-Through; @@ -49,8 +49,8 @@ public function __construct( } public function execute( - ContentStreamIdentifier $contentStreamForReading, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForReading, + ContentStreamId $contentStreamForWriting ): CommandResult { return $this->contentRepository->handle( new AddDimensionShineThrough( diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php index 6a0596afbcb..f74b0e58800 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/AddNewPropertyTransformationFactory.php @@ -17,12 +17,12 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; class AddNewPropertyTransformationFactory implements TransformationFactoryInterface { @@ -56,13 +56,13 @@ public function __construct( public function execute( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): ?CommandResult { if (!$node->hasProperty($this->newPropertyName)) { return $this->contentRepository->handle( new SetSerializedNodeProperties( $contentStreamForWriting, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $node->originDimensionSpacePoint, SerializedPropertyValues::fromArray([ $this->newPropertyName => new SerializedPropertyValue( @@ -70,7 +70,7 @@ public function execute( $this->type ) ]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php index 133d0b1f882..6c3571b1257 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangeNodeTypeTransformationFactory.php @@ -20,8 +20,8 @@ use Neos\ContentRepository\Core\Feature\NodeTypeChange\Dto\NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** @codingStandardsIgnoreStart */ /** @codingStandardsIgnoreEnd */ @@ -63,14 +63,14 @@ public function __construct( public function execute( NodeAggregate $nodeAggregate, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): CommandResult { return $this->contentRepository->handle(new ChangeNodeAggregateType( $contentStreamForWriting, - $nodeAggregate->nodeAggregateIdentifier, + $nodeAggregate->nodeAggregateId, NodeTypeName::fromString($this->newType), $this->strategy, - UserIdentifier::forSystemUser() + UserId::forSystemUser() )); } }; diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php index 1fb55572cad..4d2414f602e 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php @@ -17,13 +17,13 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\PropertyCollectionInterface; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Change the value of a given property. @@ -104,7 +104,7 @@ public function __construct( public function execute( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): ?CommandResult { if ($node->hasProperty($this->propertyName)) { /** @var PropertyCollectionInterface $properties */ @@ -133,7 +133,7 @@ public function execute( return $this->contentRepository->handle( new SetSerializedNodeProperties( $contentStreamForWriting, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $node->originDimensionSpacePoint, SerializedPropertyValues::fromArray([ $this->propertyName => new SerializedPropertyValue( @@ -141,7 +141,7 @@ public function execute( $currentProperty->getType() ) ]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php b/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php index 3cc6b6753f5..7f5ec053a8e 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/GlobalTransformationInterface.php @@ -15,7 +15,7 @@ namespace Neos\ContentRepository\NodeMigration\Transformation; use Neos\ContentRepository\Core\CommandHandler\CommandResult; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * A globally-done transformation, like changing dimension space points globally. @@ -25,7 +25,7 @@ interface GlobalTransformationInterface { public function execute( - ContentStreamIdentifier $contentStreamForReading, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForReading, + ContentStreamId $contentStreamForWriting ): CommandResult; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php index 96e5e590f27..b5726942dc0 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/MoveDimensionSpacePointTransformationFactory.php @@ -17,7 +17,7 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Command\MoveDimensionSpacePoint; /** @@ -47,8 +47,8 @@ public function __construct( } public function execute( - ContentStreamIdentifier $contentStreamForReading, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForReading, + ContentStreamId $contentStreamForWriting ): CommandResult { return $this->contentRepository->handle( new MoveDimensionSpacePoint( diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php index 10ecf15056a..89a67fff0c9 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeAggregateBasedTransformationInterface.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * A node-aggregate-based transformation, like changing the node aggregate type @@ -27,6 +27,6 @@ interface NodeAggregateBasedTransformationInterface { public function execute( NodeAggregate $nodeAggregate, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): CommandResult; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php index b1cb688fc05..87d59b3ce68 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/NodeBasedTransformationInterface.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; /** @@ -29,6 +29,6 @@ interface NodeBasedTransformationInterface public function execute( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): ?CommandResult; } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php index b9a299a60e6..57773364610 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RemoveNodeTransformationFactory.php @@ -19,10 +19,10 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeRemoval\Command\RemoveNodeAggregate; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Remove Node @@ -64,7 +64,7 @@ public function __construct( public function execute( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): ?CommandResult { if ($this->strategy === null) { $this->strategy = NodeVariantSelectionStrategy::STRATEGY_ALL_SPECIALIZATIONS; @@ -88,10 +88,10 @@ public function execute( return $this->contentRepository->handle(new RemoveNodeAggregate( $contentStreamForWriting, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $coveredDimensionSpacePoint, $this->strategy, - UserIdentifier::forSystemUser() + UserId::forSystemUser() )); } }; diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php index 1f9fb8918cb..f077ac07588 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RemovePropertyTransformationFactory.php @@ -17,11 +17,11 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Remove the property from nodes @@ -51,18 +51,18 @@ public function __construct( public function execute( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): ?CommandResult { if ($node->hasProperty($this->propertyName)) { return $this->contentRepository->handle( new SetSerializedNodeProperties( $contentStreamForWriting, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $node->originDimensionSpacePoint, SerializedPropertyValues::fromArray([ $this->propertyName => null ]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php index f156f5fc487..8e70208739e 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RenameNodeAggregateTransformationFactory.php @@ -19,8 +19,8 @@ use Neos\ContentRepository\Core\Feature\NodeRenaming\Command\ChangeNodeAggregateName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; class RenameNodeAggregateTransformationFactory implements TransformationFactoryInterface { @@ -48,13 +48,13 @@ public function __construct( public function execute( NodeAggregate $nodeAggregate, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): CommandResult { return $this->contentRepository->handle(new ChangeNodeAggregateName( $contentStreamForWriting, - $nodeAggregate->nodeAggregateIdentifier, + $nodeAggregate->nodeAggregateId, NodeName::fromString($this->newNodeName), - UserIdentifier::forSystemUser() + UserId::forSystemUser() )); } }; diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php index 53a17e6e9f5..a149477c788 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php @@ -17,13 +17,13 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; use Neos\ContentRepository\Core\Feature\NodeAggregateCommandHandler; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\PropertyCollectionInterface; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Remove the property @@ -60,7 +60,7 @@ public function __construct( public function execute( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): ?CommandResult { if ($node->hasProperty($this->from)) { @@ -69,14 +69,14 @@ public function execute( return $this->contentRepository->handle( new SetSerializedNodeProperties( $contentStreamForWriting, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $node->originDimensionSpacePoint, SerializedPropertyValues::fromArray([ $this->to => $properties->serialized() ->getProperty($this->from), $this->from => null ]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php index 3cb06594b70..37876f002e4 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php @@ -17,13 +17,13 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeModification\Command\SetSerializedNodeProperties; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\PropertyCollectionInterface; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Strip all tags on a given property @@ -53,7 +53,7 @@ public function __construct( public function execute( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): ?CommandResult { if ($node->hasProperty($this->propertyName)) { /** @var PropertyCollectionInterface $properties */ @@ -71,7 +71,7 @@ public function execute( return $this->contentRepository->handle( new SetSerializedNodeProperties( $contentStreamForWriting, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $node->originDimensionSpacePoint, SerializedPropertyValues::fromArray([ $this->propertyName => new SerializedPropertyValue( @@ -79,7 +79,7 @@ public function execute( $serializedPropertyValue->getType() ) ]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); } diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php b/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php index 6a7906c6cc0..74dbcd58abb 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/Transformations.php @@ -7,7 +7,7 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; final class Transformations { @@ -90,8 +90,8 @@ public function containsMoreThanOneTransformationType(): bool } public function executeGlobalAndBlock( - ContentStreamIdentifier $contentStreamForReading, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForReading, + ContentStreamId $contentStreamForWriting ): void { foreach ($this->globalTransformations as $globalTransformation) { $globalTransformation->execute($contentStreamForReading, $contentStreamForWriting)->block(); @@ -100,7 +100,7 @@ public function executeGlobalAndBlock( public function executeNodeAggregateBasedAndBlock( NodeAggregate $nodeAggregate, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): void { foreach ($this->nodeAggregateBasedTransformations as $nodeAggregateBasedTransformation) { $nodeAggregateBasedTransformation->execute($nodeAggregate, $contentStreamForWriting)->block(); @@ -110,7 +110,7 @@ public function executeNodeAggregateBasedAndBlock( public function executeNodeBasedAndBlock( Node $node, DimensionSpacePointSet $coveredDimensionSpacePoints, - ContentStreamIdentifier $contentStreamForWriting + ContentStreamId $contentStreamForWriting ): void { foreach ($this->nodeBasedTransformations as $nodeBasedTransformation) { $nodeBasedTransformation->execute($node, $coveredDimensionSpacePoints, $contentStreamForWriting)?->block(); diff --git a/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php b/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php index cee78db1c72..f466d688d9b 100644 --- a/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php +++ b/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php @@ -11,9 +11,9 @@ * source code. */ -use Neos\ContentRepository\Core\Dimension\ContentDimensionIdentifier; +use Neos\ContentRepository\Core\Dimension\ContentDimensionId; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Annotations as Flow; @@ -61,7 +61,7 @@ public function isAncestorNodeOf(string $nodePathOrIdentifier): bool return $nodePathOrResult; } - return str_starts_with($nodePathOrResult, (string)$this->getSubgraph()->findNodePath($this->node->nodeAggregateIdentifier)); + return str_starts_with($nodePathOrResult, (string)$this->getSubgraph()->findNodePath($this->node->nodeAggregateId)); } /** @@ -80,7 +80,7 @@ public function isDescendantNodeOf(string $nodePathOrIdentifier): bool return $nodePathOrResult; } - return str_starts_with((string)$this->getSubgraph()->findNodePath($this->node->nodeAggregateIdentifier), $nodePathOrResult); + return str_starts_with((string)$this->getSubgraph()->findNodePath($this->node->nodeAggregateId), $nodePathOrResult); } /** @@ -133,10 +133,10 @@ public function nodeIsOfType(string|array $nodeTypes): bool */ public function isInWorkspace(array $workspaceNames): bool { - $contentRepository = $this->contentRepositoryRegistry->get($this->node->subgraphIdentity->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($this->node->subgraphIdentity->contentRepositoryId); - $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamIdentifier( - $this->node->subgraphIdentity->contentStreamIdentifier + $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId( + $this->node->subgraphIdentity->contentStreamId ); return !is_null($workspace) && in_array((string)$workspace->workspaceName, $workspaceNames); } @@ -161,7 +161,7 @@ public function isInDimensionPreset(string $dimensionName, string|array $presets return in_array( $this->node->subgraphIdentity->dimensionSpacePoint->getCoordinate( - new ContentDimensionIdentifier($dimensionName) + new ContentDimensionId($dimensionName) ), $presets ); @@ -178,15 +178,15 @@ public function isInDimensionPreset(string $dimensionName, string|array $presets protected function resolveNodePathOrResult(string $nodePathOrIdentifier): bool|string { try { - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($nodePathOrIdentifier); - if ($nodeAggregateIdentifier->equals($this->node->nodeAggregateIdentifier)) { + $nodeAggregateIdentifier = NodeAggregateId::fromString($nodePathOrIdentifier); + if ($nodeAggregateIdentifier->equals($this->node->nodeAggregateId)) { return true; } - $otherNode = $this->getSubgraph()->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier); + $otherNode = $this->getSubgraph()->findNodeByNodeAggregateId($nodeAggregateIdentifier); if (is_null($otherNode)) { return false; } - return $this->getSubgraph()->findNodePath($otherNode->nodeAggregateIdentifier) . '/'; + return $this->getSubgraph()->findNodePath($otherNode->nodeAggregateId) . '/'; } catch (\InvalidArgumentException $e) { return rtrim($nodePathOrIdentifier, '/') . '/'; } diff --git a/Neos.ContentRepository.Security/Classes/Service/AuthorizationService.php b/Neos.ContentRepository.Security/Classes/Service/AuthorizationService.php index 66a7ec7bc46..866b4938b4b 100644 --- a/Neos.ContentRepository.Security/Classes/Service/AuthorizationService.php +++ b/Neos.ContentRepository.Security/Classes/Service/AuthorizationService.php @@ -85,7 +85,7 @@ public function getNodeTypeNamesDeniedForCreation(Node $referenceNode) { $privilegeSubject = new CreateNodePrivilegeSubject($referenceNode); - $contentRepository = $this->contentRepositoryRegistry->get($referenceNode->subgraphIdentity->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($referenceNode->subgraphIdentity->contentRepositoryId); $allNodeTypes = $contentRepository->getNodeTypeManager()->getNodeTypes(); $deniedCreationNodeTypes = []; diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DisallowedChildNodeAdjustment.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DisallowedChildNodeAdjustment.php index 525c5366839..7b5a1015af6 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DisallowedChildNodeAdjustment.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DisallowedChildNodeAdjustment.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\EventStore\Model\EventStream\ExpectedVersion; @@ -56,14 +56,14 @@ public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): \Generat // Then, we only want to remove the single edge. foreach ($nodeAggregate->coveredDimensionSpacePoints as $coveredDimensionSpacePoint) { $subgraph = $this->contentRepository->getContentGraph()->getSubgraph( - $nodeAggregate->contentStreamIdentifier, + $nodeAggregate->contentStreamId, $coveredDimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); - $parentNode = $subgraph->findParentNode($nodeAggregate->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($nodeAggregate->nodeAggregateId); $grandparentNode = $parentNode !== null - ? $subgraph->findParentNode($parentNode->nodeAggregateIdentifier) + ? $subgraph->findParentNode($parentNode->nodeAggregateId) : null; @@ -94,7 +94,7 @@ public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): \Generat } if (!$allowedByParent && !$allowedByGrandparent) { - $node = $subgraph->findNodeByNodeAggregateIdentifier($nodeAggregate->nodeAggregateIdentifier); + $node = $subgraph->findNodeByNodeAggregateId($nodeAggregate->nodeAggregateId); if (is_null($node)) { continue; } @@ -134,18 +134,18 @@ private function removeNodeInSingleDimensionSpacePoint( $referenceOrigin = OriginDimensionSpacePoint::fromDimensionSpacePoint($dimensionSpacePoint); $events = Events::with( new NodeAggregateWasRemoved( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier, + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId, $nodeAggregate->occupiesDimensionSpacePoint($referenceOrigin) ? new OriginDimensionSpacePointSet([$referenceOrigin]) : new OriginDimensionSpacePointSet([]), new DimensionSpacePointSet([$dimensionSpacePoint]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $nodeAggregate->contentStreamIdentifier + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $nodeAggregate->contentStreamId ); return new EventsToPublish( diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/ProjectedNodeIterator.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/ProjectedNodeIterator.php index 8624896554d..43301a6c20e 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/ProjectedNodeIterator.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/ProjectedNodeIterator.php @@ -8,7 +8,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\Projection\Workspace\WorkspaceFinder; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -44,11 +44,11 @@ public function nodeAggregatesOfType(NodeTypeName $nodeTypeName): iterable } } - private function findLiveContentStream(): ContentStreamIdentifier + private function findLiveContentStream(): ContentStreamId { $liveWorkspace = $this->workspaceFinder->findOneByName(WorkspaceName::forLive()); assert($liveWorkspace !== null, 'Live workspace not found'); - return $liveWorkspace->currentContentStreamIdentifier; + return $liveWorkspace->currentContentStreamId; } } diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php index 4ab7bc10b34..e7e1cfd3af3 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php @@ -12,7 +12,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\PropertyCollectionInterface; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\EventStream\ExpectedVersion; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; @@ -124,15 +124,15 @@ private function publishNodePropertiesWereSet( ): EventsToPublish { $events = Events::with( new NodePropertiesWereSet( - $node->subgraphIdentity->contentStreamIdentifier, - $node->nodeAggregateIdentifier, + $node->subgraphIdentity->contentStreamId, + $node->nodeAggregateId, $node->originDimensionSpacePoint, $serializedPropertyValues, - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($node->subgraphIdentity->contentStreamIdentifier); + $streamName = ContentStreamEventStreamName::fromContentStreamId($node->subgraphIdentity->contentStreamId); return new EventsToPublish( $streamName->getEventStreamName(), $events, diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/RemoveNodeAggregateTrait.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/RemoveNodeAggregateTrait.php index b2ac855aa6d..ae8b75bb29b 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/RemoveNodeAggregateTrait.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/RemoveNodeAggregateTrait.php @@ -9,7 +9,7 @@ use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; use Neos\ContentRepository\Core\Feature\NodeRemoval\Event\NodeAggregateWasRemoved; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\EventStream\ExpectedVersion; trait RemoveNodeAggregateTrait @@ -18,16 +18,16 @@ private function removeNodeAggregate(NodeAggregate $tetheredNodeAggregate): Even { $events = Events::with( new NodeAggregateWasRemoved( - $tetheredNodeAggregate->contentStreamIdentifier, - $tetheredNodeAggregate->nodeAggregateIdentifier, + $tetheredNodeAggregate->contentStreamId, + $tetheredNodeAggregate->nodeAggregateId, $tetheredNodeAggregate->occupiedDimensionSpacePoints, $tetheredNodeAggregate->coveredDimensionSpacePoints, - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) ); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $tetheredNodeAggregate->contentStreamIdentifier + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $tetheredNodeAggregate->contentStreamId ); return new EventsToPublish( $streamName->getEventStreamName(), diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php index 3b55b7de107..b80ae7cc468 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php @@ -52,9 +52,9 @@ public static function createForNode( . ($remediation ? '' : '!!!NOT AUTO-FIXABLE YET!!! ') . $errorMessage, null, [ - 'contentStream' => $node->subgraphIdentity->contentStreamIdentifier->jsonSerialize(), + 'contentStream' => $node->subgraphIdentity->contentStreamId->jsonSerialize(), 'dimensionSpacePoint' => json_encode($node->originDimensionSpacePoint->jsonSerialize()), - 'nodeAggregateIdentifier' => $node->nodeAggregateIdentifier->jsonSerialize(), + 'nodeAggregateId' => $node->nodeAggregateId->jsonSerialize(), 'isAutoFixable' => ($remediation !== null) ], $type, @@ -73,8 +73,8 @@ public static function createForNodeAggregate( . ($remediation ? '' : '!!!NOT AUTO-FIXABLE YET!!! ') . $errorMessage, null, [ - 'contentStream' => $nodeAggregate->contentStreamIdentifier->jsonSerialize(), - 'nodeAggregateIdentifier' => $nodeAggregate->nodeAggregateIdentifier->jsonSerialize(), + 'contentStream' => $nodeAggregate->contentStreamId->jsonSerialize(), + 'nodeAggregateId' => $nodeAggregate->nodeAggregateId->jsonSerialize(), 'isAutoFixable' => ($remediation !== null) ], $type, diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php index 97175410b6e..f73c5502300 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php @@ -8,14 +8,14 @@ use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeMove\Event\NodeAggregateWasMoved; use Neos\ContentRepository\Core\Feature\Common\TetheredNodeInternals; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeVariantAssignment; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeVariantAssignments; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeMoveMapping; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeMoveMappings; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\EventStore\Model\EventStream\ExpectedVersion; use Neos\ContentRepository\Core\DimensionSpace; use Neos\ContentRepository\Core\NodeType\NodeType; @@ -63,12 +63,12 @@ public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): \Generat $tetheredNodeName = NodeName::fromString($tetheredNodeName); $subgraph = $this->contentRepository->getContentGraph()->getSubgraph( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $node->originDimensionSpacePoint->toDimensionSpacePoint(), VisibilityConstraints::withoutRestrictions() ); $tetheredNode = $subgraph->findChildNodeConnectedThroughEdgeName( - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $tetheredNodeName ); if ($tetheredNode === null) { @@ -86,12 +86,12 @@ function () use ($nodeAggregate, $node, $tetheredNodeName, $expectedTetheredNode $tetheredNodeName, null, $expectedTetheredNodeType, - UserIdentifier::forSystemUser(), + UserId::forSystemUser(), $this->contentRepository ); - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier( - $node->subgraphIdentity->contentStreamIdentifier + $streamName = ContentStreamEventStreamName::fromContentStreamId( + $node->subgraphIdentity->contentStreamId ); return new EventsToPublish( $streamName->getEventStreamName(), @@ -109,8 +109,8 @@ function () use ($nodeAggregate, $node, $tetheredNodeName, $expectedTetheredNode // find disallowed tethered nodes $tetheredNodeAggregates = $this->contentRepository->getContentGraph()->findTetheredChildNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ); foreach ($tetheredNodeAggregates as $tetheredNodeAggregate) { /* @var $tetheredNodeAggregate NodeAggregate */ @@ -133,11 +133,11 @@ function () use ($tetheredNodeAggregate) { foreach ($nodeAggregate->getNodes() as $node) { assert($node instanceof Node); $subgraph = $this->contentRepository->getContentGraph()->getSubgraph( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $node->originDimensionSpacePoint->toDimensionSpacePoint(), VisibilityConstraints::withoutRestrictions() ); - $childNodes = $subgraph->findChildNodes($node->nodeAggregateIdentifier); + $childNodes = $subgraph->findChildNodes($node->nodeAggregateId); /** is indexed by node name, and the value is the tethered node itself */ $actualTetheredChildNodes = []; @@ -158,7 +158,7 @@ function () use ($tetheredNodeAggregate) { . implode(', ', array_keys($actualTetheredChildNodes)), function () use ($node, $actualTetheredChildNodes, $expectedTetheredNodes) { return $this->reorderNodes( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $actualTetheredChildNodes, array_keys($expectedTetheredNodes) ); @@ -215,7 +215,7 @@ protected function getNodeTypeManager(): NodeTypeManager * @param array $expectedNodeOrdering */ private function reorderNodes( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, array $actualTetheredChildNodes, array $expectedNodeOrdering ): EventsToPublish { @@ -232,28 +232,28 @@ private function reorderNodes( $events[] = new NodeAggregateWasMoved( $contentStreamIdentifier, - $nodeToMove->nodeAggregateIdentifier, + $nodeToMove->nodeAggregateId, NodeMoveMappings::fromArray([ new NodeMoveMapping( $nodeToMove->originDimensionSpacePoint, NodeVariantAssignments::createFromArray([]), // we do not want to assign new parents NodeVariantAssignments::createFromArray([ $nodeToMove->originDimensionSpacePoint->hash => new NodeVariantAssignment( - $succeedingNode->nodeAggregateIdentifier, + $succeedingNode->nodeAggregateId, $succeedingNode->originDimensionSpacePoint ) ]) ) ]), new DimensionSpace\DimensionSpacePointSet([]), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ); // now, go one step left. $succeedingSiblingNodeName = $nodeNameToMove; } - $streamName = ContentStreamEventStreamName::fromContentStreamIdentifier($contentStreamIdentifier); + $streamName = ContentStreamEventStreamName::fromContentStreamId($contentStreamIdentifier); return new EventsToPublish( $streamName->getEventStreamName(), Events::fromArray($events), diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php index c58ba449bac..7b0fe4ee018 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php @@ -3,7 +3,7 @@ use Neos\ContentRepository\Core\Service\ContentStreamPrunerFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Cli\CommandController; @@ -20,7 +20,7 @@ class ContentStreamCommandController extends CommandController */ public function exportCommand(string $contentStreamIdentifier, string $contentRepositoryIdentifier = 'default', int $startSequenceNumber = 0): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); throw new \RuntimeException('TODO IMPL??'); // TODO??$events = $this->contentRepositoryEventStore->load( // StreamName::fromString($contentStreamIdentifier), @@ -123,7 +123,7 @@ public function importCommand(string $contentStreamIdentifier, string $file = nu */ public function pruneCommand(string $contentRepositoryIdentifier = 'default'): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentStreamPruner = $this->contentRepositoryRegistry->getService($contentRepositoryIdentifier, new ContentStreamPrunerFactory()); $unusedContentStreams = $contentStreamPruner->prune(); @@ -142,7 +142,7 @@ public function pruneCommand(string $contentRepositoryIdentifier = 'default'): v */ public function pruneRemovedFromEventStreamCommand(string $contentRepositoryIdentifier = 'default'): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentStreamPruner = $this->contentRepositoryRegistry->getService($contentRepositoryIdentifier, new ContentStreamPrunerFactory()); $unusedContentStreams = $contentStreamPruner->pruneRemovedFromEventStream(); diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php index d3df5319e33..569cf324ea7 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php @@ -10,7 +10,7 @@ use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateProjection; use Neos\ContentRepository\Core\Projection\Workspace\WorkspaceProjection; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ESCR\AssetUsage\Projector\AssetUsageProjection; use Neos\Flow\Annotations as Flow; use Neos\Flow\Cli\CommandController; @@ -35,7 +35,7 @@ class CrCommandController extends CommandController public function setupCommand(string $contentRepositoryIdentifier = 'default') { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $contentRepository->setUp(); @@ -44,7 +44,7 @@ public function setupCommand(string $contentRepositoryIdentifier = 'default') public function replayCommand(string $projectionName, string $contentRepositoryIdentifier = 'default', int $maximumSequenceNumber = null, bool $quiet = false) { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php index 0fc282b7ea8..54569063e32 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php @@ -17,7 +17,7 @@ use Neos\ContentRepository\NodeMigration\Command\ExecuteMigration; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\ContentRepositoryRegistry\Migration\Factory\MigrationFactory; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Cli\CommandController; use Neos\ContentRepository\NodeMigration\MigrationException; use Neos\ContentRepository\NodeMigration\Command\MigrationConfiguration; @@ -53,7 +53,7 @@ public function __construct( */ public function migrateCommand(string $version, $workspace = 'live', bool $force = false, string $contentRepositoryIdentifier = 'default') { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); try { $migrationConfiguration = $this->migrationFactory->getMigrationForVersion($version); diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php index 5f199123885..634a20853b7 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php @@ -17,7 +17,7 @@ use Neos\ContentRepository\StructureAdjustment\Adjustment\StructureAdjustment; use Neos\ContentRepository\StructureAdjustment\StructureAdjustmentServiceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Cli\CommandController; use Neos\Flow\Annotations as Flow; @@ -31,7 +31,7 @@ final class StructureAdjustmentsCommandController extends CommandController public function detectCommand(string $nodeType = null, string $contentRepositoryIdentifier = 'default'): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $structureAdjustmentService = $this->contentRepositoryRegistry->getService($contentRepositoryIdentifier, new StructureAdjustmentServiceFactory()); if ($nodeType !== null) { @@ -47,7 +47,7 @@ public function detectCommand(string $nodeType = null, string $contentRepository public function fixCommand(string $nodeType = null, string $contentRepositoryIdentifier = 'default'): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $structureAdjustmentService = $this->contentRepositoryRegistry->getService($contentRepositoryIdentifier, new StructureAdjustmentServiceFactory()); if ($nodeType !== null) { diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/SubprocessProjectionCatchUpCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/SubprocessProjectionCatchUpCommandController.php index 839034d9281..bf122f2a606 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/SubprocessProjectionCatchUpCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/SubprocessProjectionCatchUpCommandController.php @@ -5,7 +5,7 @@ use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\ContentRepositoryRegistry\Factory\ProjectionCatchUpTrigger\SubprocessProjectionCatchUpTrigger; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Cli\CommandController; @@ -24,7 +24,7 @@ class SubprocessProjectionCatchUpCommandController extends CommandController public function catchupCommand(string $contentRepositoryIdentifier, string $projectionClassName): void { - $contentRepository = $this->contentRepositoryRegistry->get(ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier)); + $contentRepository = $this->contentRepositoryRegistry->get(ContentRepositoryId::fromString($contentRepositoryIdentifier)); $contentRepository->catchUpProjection($projectionClassName); } } diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php index 79c53647df7..86286faeec1 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php @@ -6,7 +6,7 @@ use Neos\ContentRepository\Core\Service\WorkspaceMaintenanceServiceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Cli\CommandController; @@ -20,7 +20,7 @@ class WorkspaceCommandController extends CommandController */ public function rebaseOutdatedCommand(string $contentRepositoryIdentifier = 'default'): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $workspaceMaintenanceService = $this->contentRepositoryRegistry->getService( $contentRepositoryIdentifier, new WorkspaceMaintenanceServiceFactory() diff --git a/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php b/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php index 9d829e33a12..053171b909a 100644 --- a/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php +++ b/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php @@ -21,7 +21,7 @@ use Neos\ContentRepositoryRegistry\Factory\EventStore\EventStoreFactoryInterface; use Neos\ContentRepositoryRegistry\Factory\NodeTypeManager\NodeTypeManagerFactoryInterface; use Neos\ContentRepositoryRegistry\Factory\ProjectionCatchUpTrigger\ProjectionCatchUpTriggerFactoryInterface; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\EventStore\EventStoreInterface; use Neos\Flow\Annotations as Flow; use Neos\Flow\ObjectManagement\ObjectManagerInterface; @@ -62,7 +62,7 @@ public function __construct( /** * @throws ContentRepositoryNotFound | InvalidConfigurationException */ - public function get(ContentRepositoryIdentifier $contentRepositoryIdentifier): ContentRepository + public function get(ContentRepositoryId $contentRepositoryIdentifier): ContentRepository { if (!array_key_exists($contentRepositoryIdentifier->value, $this->contentRepositoryInstances)) { $this->contentRepositoryInstances[$contentRepositoryIdentifier->value] = $this->getFactory($contentRepositoryIdentifier)->build(); @@ -72,9 +72,9 @@ public function get(ContentRepositoryIdentifier $contentRepositoryIdentifier): C public function subgraphForNode(Node $node): ContentSubgraphInterface { - $contentRepository = $this->get($node->subgraphIdentity->contentRepositoryIdentifier); + $contentRepository = $this->get($node->subgraphIdentity->contentRepositoryId); return $contentRepository->getContentGraph()->getSubgraph( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $node->subgraphIdentity->dimensionSpacePoint, $node->subgraphIdentity->visibilityConstraints ); @@ -86,7 +86,7 @@ public function subgraphForNode(Node $node): ContentSubgraphInterface * @throws ContentRepositoryNotFound | InvalidConfigurationException * @template T of ContentRepositoryServiceInterface */ - public function getService(ContentRepositoryIdentifier $contentRepositoryIdentifier, ContentRepositoryServiceFactoryInterface $contentRepositoryServiceFactory): ContentRepositoryServiceInterface + public function getService(ContentRepositoryId $contentRepositoryIdentifier, ContentRepositoryServiceFactoryInterface $contentRepositoryServiceFactory): ContentRepositoryServiceInterface { if (!isset($this->contentRepositoryServiceInstances[$contentRepositoryIdentifier->value][get_class($contentRepositoryServiceFactory)])) { $this->contentRepositoryServiceInstances[$contentRepositoryIdentifier->value][get_class($contentRepositoryServiceFactory)] = $this->getFactory($contentRepositoryIdentifier)->buildService($contentRepositoryServiceFactory); @@ -98,7 +98,7 @@ public function getService(ContentRepositoryIdentifier $contentRepositoryIdentif /** * @throws ContentRepositoryNotFound | InvalidConfigurationException */ - private function getFactory(ContentRepositoryIdentifier $contentRepositoryIdentifier): ContentRepositoryFactory + private function getFactory(ContentRepositoryId $contentRepositoryIdentifier): ContentRepositoryFactory { // This cache is CRUCIAL, because it ensures that the same CR always deals with the same objects internally, even if multiple services // are called on the same CR. @@ -111,7 +111,7 @@ private function getFactory(ContentRepositoryIdentifier $contentRepositoryIdenti /** * @throws ContentRepositoryNotFound | InvalidConfigurationException */ - private function buildFactory(ContentRepositoryIdentifier $contentRepositoryIdentifier): ContentRepositoryFactory + private function buildFactory(ContentRepositoryId $contentRepositoryIdentifier): ContentRepositoryFactory { assert(is_array($this->settings['contentRepositories'])); assert(isset($this->settings['contentRepositories'][$contentRepositoryIdentifier->value]) && is_array($this->settings['contentRepositories'][$contentRepositoryIdentifier->value]), ContentRepositoryNotFound::notConfigured($contentRepositoryIdentifier)); @@ -136,7 +136,7 @@ private function buildFactory(ContentRepositoryIdentifier $contentRepositoryIden } } - private function buildEventStore(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): EventStoreInterface + private function buildEventStore(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): EventStoreInterface { assert(isset($contentRepositoryPreset['eventStore']['factoryObjectName']), InvalidConfigurationException::fromMessage('Content repository preset "%s" does not have eventStore.factoryObjectName configured.', $contentRepositorySettings['preset'])); $eventStoreFactory = $this->objectManager->get($contentRepositoryPreset['eventStore']['factoryObjectName']); @@ -146,7 +146,7 @@ private function buildEventStore(ContentRepositoryIdentifier $contentRepositoryI return $eventStoreFactory->build($contentRepositoryIdentifier, $contentRepositorySettings, $contentRepositoryPreset['eventStore']); } - private function buildNodeTypeManager(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): NodeTypeManager + private function buildNodeTypeManager(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): NodeTypeManager { assert(isset($contentRepositoryPreset['nodeTypeManager']['factoryObjectName']), InvalidConfigurationException::fromMessage('Content repository preset "%s" does not have nodeTypeManager.factoryObjectName configured.', $contentRepositorySettings['preset'])); $nodeTypeManagerFactory = $this->objectManager->get($contentRepositoryPreset['nodeTypeManager']['factoryObjectName']); @@ -156,7 +156,7 @@ private function buildNodeTypeManager(ContentRepositoryIdentifier $contentReposi return $nodeTypeManagerFactory->build($contentRepositoryIdentifier, $contentRepositorySettings, $contentRepositoryPreset['nodeTypeManager']); } - private function buildContentDimensionSource(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): ContentDimensionSourceInterface + private function buildContentDimensionSource(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): ContentDimensionSourceInterface { assert(isset($contentRepositoryPreset['contentDimensionSource']['factoryObjectName']), InvalidConfigurationException::fromMessage('Content repository preset "%s" does not have contentDimensionSource.factoryObjectName configured.', $contentRepositorySettings['preset'])); $contentDimensionSourceFactory = $this->objectManager->get($contentRepositoryPreset['contentDimensionSource']['factoryObjectName']); @@ -190,7 +190,7 @@ private function buildPropertySerializer(array $contentRepositorySettings, array return new Serializer($normalizers); } - private function buildProjectionsFactory(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): ProjectionsFactory + private function buildProjectionsFactory(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): ProjectionsFactory { assert(isset($contentRepositoryPreset['projections']) && is_array($contentRepositoryPreset['projections']), InvalidConfigurationException::fromMessage('Content repository preset "%s" does not have projections configured, or the value is no array.', $contentRepositorySettings['preset'])); $projectionsFactory = new ProjectionsFactory(); @@ -215,7 +215,7 @@ private function buildProjectionsFactory(ContentRepositoryIdentifier $contentRep return $projectionsFactory; } - private function buildProjectionCatchUpTrigger(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): ProjectionCatchUpTriggerInterface + private function buildProjectionCatchUpTrigger(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentRepositoryPreset): ProjectionCatchUpTriggerInterface { assert(isset($contentRepositoryPreset['projectionCatchUpTrigger']['factoryObjectName']), InvalidConfigurationException::fromMessage('Content repository preset "%s" does not have projectionCatchUpTrigger.factoryObjectName configured.', $contentRepositorySettings['preset'])); $projectionCatchUpTriggerFactory = $this->objectManager->get($contentRepositoryPreset['projectionCatchUpTrigger']['factoryObjectName']); diff --git a/Neos.ContentRepositoryRegistry/Classes/Exception/ContentRepositoryNotFound.php b/Neos.ContentRepositoryRegistry/Classes/Exception/ContentRepositoryNotFound.php index 90dab9dcc3c..18430d9ba1e 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Exception/ContentRepositoryNotFound.php +++ b/Neos.ContentRepositoryRegistry/Classes/Exception/ContentRepositoryNotFound.php @@ -2,13 +2,13 @@ namespace Neos\ContentRepositoryRegistry\Exception; use Neos\Flow\Annotations as Flow; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; #[Flow\Proxy(false)] final class ContentRepositoryNotFound extends \InvalidArgumentException { - public static function notConfigured(ContentRepositoryIdentifier $contentRepositoryIdentifier): self + public static function notConfigured(ContentRepositoryId $contentRepositoryIdentifier): self { return new self(sprintf('A content repository with id "%s" is not configured', $contentRepositoryIdentifier->value), 1650557155); } diff --git a/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php b/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php index d2865a1a1a8..6077daabacd 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php +++ b/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php @@ -2,18 +2,18 @@ namespace Neos\ContentRepositoryRegistry\Exception; use Neos\Flow\Annotations as Flow; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; #[Flow\Proxy(false)] final class InvalidConfigurationException extends \RuntimeException { - public static function missingPreset(ContentRepositoryIdentifier $contentRepositoryId, string $presetName): self + public static function missingPreset(ContentRepositoryId $contentRepositoryId, string $presetName): self { return new self(sprintf('The preset "%s" referred to in content repository "%s" does not exist', $presetName, $contentRepositoryId->value), 1650557150); } - public static function fromException(ContentRepositoryIdentifier $contentRepositoryId, \Exception $exception): self + public static function fromException(ContentRepositoryId $contentRepositoryId, \Exception $exception): self { return new self(sprintf('Failed to create content repository "%s": %s', $contentRepositoryId->value, $exception->getMessage()), 1650557143, $exception); } diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ConfigurationBasedContentDimensionSourceFactory.php b/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ConfigurationBasedContentDimensionSourceFactory.php index b22a28075c9..634df602167 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ConfigurationBasedContentDimensionSourceFactory.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ConfigurationBasedContentDimensionSourceFactory.php @@ -4,7 +4,7 @@ use Neos\ContentRepository\Core\Dimension\ConfigurationBasedContentDimensionSource; use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; class ConfigurationBasedContentDimensionSourceFactory implements ContentDimensionSourceFactoryInterface { @@ -13,7 +13,7 @@ public function __construct( { } - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentDimensionSourcePreset): ContentDimensionSourceInterface + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentDimensionSourcePreset): ContentDimensionSourceInterface { return new ConfigurationBasedContentDimensionSource( $contentRepositorySettings['contentDimensions'] ?? [] diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ContentDimensionSourceFactoryInterface.php b/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ContentDimensionSourceFactoryInterface.php index 91cf69e7599..93764209e8a 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ContentDimensionSourceFactoryInterface.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/ContentDimensionSource/ContentDimensionSourceFactoryInterface.php @@ -3,9 +3,9 @@ namespace Neos\ContentRepositoryRegistry\Factory\ContentDimensionSource; use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; interface ContentDimensionSourceFactoryInterface { - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentDimensionSourcePreset): ContentDimensionSourceInterface; + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $contentDimensionSourcePreset): ContentDimensionSourceInterface; } diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/DoctrineEventStoreFactory.php b/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/DoctrineEventStoreFactory.php index 1754de4e10d..b67f8326ee1 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/DoctrineEventStoreFactory.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/DoctrineEventStoreFactory.php @@ -4,7 +4,7 @@ namespace Neos\ContentRepositoryRegistry\Factory\EventStore; use Doctrine\DBAL\Connection; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\EventStore\DoctrineAdapter\DoctrineEventStore; use Neos\EventStore\EventStoreInterface; @@ -16,7 +16,7 @@ public function __construct( { } - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $eventStorePreset): EventStoreInterface + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $eventStorePreset): EventStoreInterface { return new DoctrineEventStore( $this->connection, @@ -24,7 +24,7 @@ public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, ); } - public static function databaseTableName(ContentRepositoryIdentifier $contentRepositoryIdentifier): string + public static function databaseTableName(ContentRepositoryId $contentRepositoryIdentifier): string { return sprintf('cr_%s_events', $contentRepositoryIdentifier); } diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/EventStoreFactoryInterface.php b/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/EventStoreFactoryInterface.php index 0e0f56bf055..63b106d1584 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/EventStoreFactoryInterface.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/EventStore/EventStoreFactoryInterface.php @@ -2,10 +2,10 @@ declare(strict_types=1); namespace Neos\ContentRepositoryRegistry\Factory\EventStore; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\EventStore\EventStoreInterface; interface EventStoreFactoryInterface { - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $eventStorePreset): EventStoreInterface; + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $eventStorePreset): EventStoreInterface; } diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/DefaultNodeTypeManagerFactory.php b/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/DefaultNodeTypeManagerFactory.php index 5dd8640fcf9..faf90168d40 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/DefaultNodeTypeManagerFactory.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/DefaultNodeTypeManagerFactory.php @@ -2,7 +2,7 @@ declare(strict_types=1); namespace Neos\ContentRepositoryRegistry\Factory\NodeTypeManager; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepositoryRegistry\Configuration\NodeTypeEnrichmentService; use Neos\Flow\Configuration\ConfigurationManager; @@ -18,7 +18,7 @@ public function __construct( { } - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $nodeTypeManagerPreset): NodeTypeManager + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $nodeTypeManagerPreset): NodeTypeManager { return new NodeTypeManager( function() { diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/NodeTypeManagerFactoryInterface.php b/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/NodeTypeManagerFactoryInterface.php index 957fb35119c..d15f756095d 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/NodeTypeManagerFactoryInterface.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/NodeTypeManager/NodeTypeManagerFactoryInterface.php @@ -3,9 +3,9 @@ namespace Neos\ContentRepositoryRegistry\Factory\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; interface NodeTypeManagerFactoryInterface { - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $nodeTypeManagerPreset): NodeTypeManager; + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $nodeTypeManagerPreset): NodeTypeManager; } diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/CatchUpTriggerWithSynchronousOption.php b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/CatchUpTriggerWithSynchronousOption.php index 03caeac03d1..abd50ba82d7 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/CatchUpTriggerWithSynchronousOption.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/CatchUpTriggerWithSynchronousOption.php @@ -7,7 +7,7 @@ use Neos\Flow\Annotations as Flow; use Neos\ContentRepository\Core\Projection\ProjectionCatchUpTriggerInterface; use Neos\ContentRepository\Core\Projection\Projections; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; /** * Pragmatic performance booster for some "batch" operations needed by the Neos UI. @@ -54,7 +54,7 @@ public static function synchronously(\Closure $fn): void } public function __construct( - private readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + private readonly ContentRepositoryId $contentRepositoryIdentifier, private readonly SubprocessProjectionCatchUpTrigger $inner ) { diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/ProjectionCatchUpTriggerFactoryInterface.php b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/ProjectionCatchUpTriggerFactoryInterface.php index 953e2b941cb..c009438a42f 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/ProjectionCatchUpTriggerFactoryInterface.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/ProjectionCatchUpTriggerFactoryInterface.php @@ -4,9 +4,9 @@ use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; use Neos\ContentRepository\Core\Projection\ProjectionCatchUpTriggerInterface; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; interface ProjectionCatchUpTriggerFactoryInterface { - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $projectionCatchUpTriggerPreset): ProjectionCatchUpTriggerInterface; + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $projectionCatchUpTriggerPreset): ProjectionCatchUpTriggerInterface; } diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTrigger.php b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTrigger.php index b8e7b2ea6c0..a36e8661c12 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTrigger.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTrigger.php @@ -6,7 +6,7 @@ use Neos\ContentRepository\Core\Projection\ProjectionCatchUpTriggerInterface; use Neos\ContentRepository\Core\Projection\Projections; use Neos\ContentRepositoryRegistry\Command\SubprocessProjectionCatchUpCommandController; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Core\Booting\Scripts; /** @@ -21,7 +21,7 @@ class SubprocessProjectionCatchUpTrigger implements ProjectionCatchUpTriggerInte protected $flowSettings; public function __construct( - private readonly ContentRepositoryIdentifier $contentRepositoryIdentifier + private readonly ContentRepositoryId $contentRepositoryIdentifier ) { } diff --git a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTriggerFactory.php b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTriggerFactory.php index 56016fc8a88..1d54aa85eb2 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTriggerFactory.php +++ b/Neos.ContentRepositoryRegistry/Classes/Factory/ProjectionCatchUpTrigger/SubprocessProjectionCatchUpTriggerFactory.php @@ -4,14 +4,14 @@ use Neos\ContentRepository\Core\Projection\ProjectionCatchUpTriggerInterface; use Neos\ContentRepositoryRegistry\Command\SubprocessProjectionCatchUpCommandController; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; /** * See {@see SubprocessProjectionCatchUpCommandController} for the inner part */ class SubprocessProjectionCatchUpTriggerFactory implements ProjectionCatchUpTriggerFactoryInterface { - public function build(ContentRepositoryIdentifier $contentRepositoryIdentifier, array $contentRepositorySettings, array $projectionCatchUpTriggerPreset): ProjectionCatchUpTriggerInterface + public function build(ContentRepositoryId $contentRepositoryIdentifier, array $contentRepositorySettings, array $projectionCatchUpTriggerPreset): ProjectionCatchUpTriggerInterface { return new CatchUpTriggerWithSynchronousOption( $contentRepositoryIdentifier, diff --git a/Neos.ESCR.AssetUsage/Classes/Command/AssetUsageCommandController.php b/Neos.ESCR.AssetUsage/Classes/Command/AssetUsageCommandController.php index 83be209647d..8ff2ccf344c 100644 --- a/Neos.ESCR.AssetUsage/Classes/Command/AssetUsageCommandController.php +++ b/Neos.ESCR.AssetUsage/Classes/Command/AssetUsageCommandController.php @@ -88,7 +88,7 @@ private function isAssetUsageStillValid(AssetUsage $usage): bool $dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); - $node = $subGraph->findNodeByNodeAggregateIdentifier($usage->nodeAggregateIdentifier); + $node = $subGraph->findNodeByNodeAggregateId($usage->nodeAggregateIdentifier); return $node !== null; } diff --git a/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsage.php b/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsage.php index a4fbc728c07..2682aa71ff3 100644 --- a/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsage.php +++ b/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsage.php @@ -3,8 +3,8 @@ namespace Neos\ESCR\AssetUsage\Dto; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Flow\Annotations as Flow; /** @@ -15,9 +15,9 @@ final class AssetUsage public function __construct( public readonly string $assetIdentifier, - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamIdentifier, public readonly string $originDimensionSpacePoint, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateIdentifier, public readonly string $propertyName, ) { } diff --git a/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsageFilter.php b/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsageFilter.php index 21cd4d9f394..4f8e73bc3fa 100644 --- a/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsageFilter.php +++ b/Neos.ESCR.AssetUsage/Classes/Dto/AssetUsageFilter.php @@ -3,7 +3,7 @@ namespace Neos\ESCR\AssetUsage\Dto; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\Flow\Annotations as Flow; /** @@ -14,7 +14,7 @@ final class AssetUsageFilter private function __construct( public readonly ?string $assetIdentifier, - public readonly ?ContentStreamIdentifier $contentStreamIdentifier, + public readonly ?ContentStreamId $contentStreamIdentifier, public readonly bool $groupByAsset, public readonly bool $groupByNode, ) { @@ -30,7 +30,7 @@ public function withAsset(string $assetIdentifier): self return new self($assetIdentifier, $this->contentStreamIdentifier, $this->groupByAsset, $this->groupByNode); } - public function withContentStream(ContentStreamIdentifier $contentStreamIdentifier): self + public function withContentStream(ContentStreamId $contentStreamIdentifier): self { return new self($this->assetIdentifier, $contentStreamIdentifier, $this->groupByAsset, $this->groupByNode); } diff --git a/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageProjection.php b/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageProjection.php index ab259598fd5..1af70e8dd26 100644 --- a/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageProjection.php +++ b/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageProjection.php @@ -64,9 +64,9 @@ public function whenNodeAggregateWithNodeWasCreated( ); } $nodeAddress = new NodeAddress( - $event->contentStreamIdentifier, + $event->contentStreamId, $event->originDimensionSpacePoint->toDimensionSpacePoint(), - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, null ); $this->repository->addUsagesForNode($nodeAddress, $assetIdsByProperty); @@ -88,9 +88,9 @@ public function whenNodePropertiesWereSet(NodePropertiesWereSet $event, RawEvent ); } $nodeAddress = new NodeAddress( - $event->getContentStreamIdentifier(), + $event->getContentStreamId(), $event->getOriginDimensionSpacePoint()->toDimensionSpacePoint(), - $event->getNodeAggregateIdentifier(), + $event->getNodeAggregateId(), null ); $this->repository->addUsagesForNode($nodeAddress, $assetIdsByProperty); @@ -99,7 +99,7 @@ public function whenNodePropertiesWereSet(NodePropertiesWereSet $event, RawEvent public function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): void { $this->repository->removeNode( - $event->getNodeAggregateIdentifier(), + $event->getNodeAggregateId(), $event->getAffectedOccupiedDimensionSpacePoints()->toDimensionSpacePointSet() ); } @@ -113,39 +113,39 @@ public function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): public function whenContentStreamWasForked(ContentStreamWasForked $event): void { $this->repository->copyContentStream( - $event->sourceContentStreamIdentifier, - $event->newContentStreamIdentifier + $event->sourceContentStreamId, + $event->newContentStreamId ); } public function whenWorkspaceWasDiscarded(WorkspaceWasDiscarded $event): void { - $this->repository->removeContentStream($event->previousContentStreamIdentifier); + $this->repository->removeContentStream($event->previousContentStreamId); } public function whenWorkspaceWasPartiallyDiscarded(WorkspaceWasPartiallyDiscarded $event): void { - $this->repository->removeContentStream($event->previousContentStreamIdentifier); + $this->repository->removeContentStream($event->previousContentStreamId); } public function whenWorkspaceWasPartiallyPublished(WorkspaceWasPartiallyPublished $event): void { - $this->repository->removeContentStream($event->previousSourceContentStreamIdentifier); + $this->repository->removeContentStream($event->previousSourceContentStreamId); } public function whenWorkspaceWasPublished(WorkspaceWasPublished $event): void { - $this->repository->removeContentStream($event->previousSourceContentStreamIdentifier); + $this->repository->removeContentStream($event->previousSourceContentStreamId); } public function whenWorkspaceWasRebased(WorkspaceWasRebased $event): void { - $this->repository->removeContentStream($event->previousContentStreamIdentifier); + $this->repository->removeContentStream($event->previousContentStreamId); } public function whenContentStreamWasRemoved(ContentStreamWasRemoved $event): void { - $this->repository->removeContentStream($event->contentStreamIdentifier); + $this->repository->removeContentStream($event->contentStreamId); } diff --git a/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageRepository.php b/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageRepository.php index cb4bd690b16..6a299b86b57 100644 --- a/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageRepository.php +++ b/Neos.ESCR.AssetUsage/Classes/Projector/AssetUsageRepository.php @@ -9,8 +9,8 @@ use Doctrine\DBAL\ForwardCompatibility\Result; use Doctrine\DBAL\Platforms\AbstractPlatform; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\Flow\Annotations as Flow; @@ -68,9 +68,9 @@ public function findUsages(AssetUsageFilter $filter): AssetUsages foreach ($result->iterateAssociative() as $row) { yield new AssetUsage( $row['assetidentifier'], - ContentStreamIdentifier::fromString($row['contentstreamidentifier']), + ContentStreamId::fromString($row['contentstreamidentifier']), $row['origindimensionspacepointhash'], - NodeAggregateIdentifier::fromString($row['nodeaggregateidentifier']), + NodeAggregateId::fromString($row['nodeaggregateidentifier']), $row['propertyname'] ); } @@ -92,8 +92,8 @@ public function addUsagesForNode(NodeAddress $nodeAddress, AssetIdsByProperty $a . ' AND nodeAggregateIdentifier = :nodeAggregateIdentifier' . ' AND originDimensionSpacePointHash = :originDimensionSpacePointHash' . ' AND propertyName IN (:propertyNames)', [ - 'contentStreamIdentifier' => $nodeAddress->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $nodeAddress->nodeAggregateIdentifier, + 'contentStreamIdentifier' => $nodeAddress->contentStreamId, + 'nodeAggregateIdentifier' => $nodeAddress->nodeAggregateId, 'originDimensionSpacePointHash' => $nodeAddress->dimensionSpacePoint->hash, 'propertyNames' => $assetIdsByProperty->propertyNamesWithoutAsset(), ], [ @@ -105,8 +105,8 @@ public function addUsagesForNode(NodeAddress $nodeAddress, AssetIdsByProperty $a try { $this->dbal->insert(self::TABLE_NAME, [ 'assetIdentifier' => $assetIdentifier, - 'contentStreamIdentifier' => $nodeAddress->contentStreamIdentifier, - 'nodeAggregateIdentifier' => $nodeAddress->nodeAggregateIdentifier, + 'contentStreamIdentifier' => $nodeAddress->contentStreamId, + 'nodeAggregateIdentifier' => $nodeAddress->nodeAggregateId, 'originDimensionSpacePointHash' => $nodeAddress->dimensionSpacePoint->hash, 'propertyName' => $propertyName, ]); @@ -117,14 +117,14 @@ public function addUsagesForNode(NodeAddress $nodeAddress, AssetIdsByProperty $a } } - public function removeContentStream(ContentStreamIdentifier $contentStreamIdentifier): void + public function removeContentStream(ContentStreamId $contentStreamIdentifier): void { $this->dbal->delete(self::TABLE_NAME, ['contentStreamIdentifier' => $contentStreamIdentifier]); } public function copyContentStream( - ContentStreamIdentifier $sourceContentStreamIdentifier, - ContentStreamIdentifier $targetContentStreamIdentifier + ContentStreamId $sourceContentStreamIdentifier, + ContentStreamId $targetContentStreamIdentifier ): void { $this->dbal->executeStatement( 'INSERT INTO ' . self::TABLE_NAME @@ -179,7 +179,7 @@ public function removeAsset(string $assetIdentifier): void } public function removeNode( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, DimensionSpacePointSet $dimensionSpacePoints ): void { $this->dbal->executeStatement( diff --git a/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyContext.php b/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyContext.php index 246729804cd..5ee106f5e90 100644 --- a/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyContext.php +++ b/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyContext.php @@ -83,7 +83,7 @@ public function getWorkspace(): EmulatedLegacyWorkspace $this->legacyLogger->info('context.workspace called', LogEnvironment::fromMethodName(__METHOD__)); return new EmulatedLegacyWorkspace( - $this->node->subgraphIdentity->contentRepositoryIdentifier, + $this->node->subgraphIdentity->contentRepositoryId, $this->getNodeAddressOfContextNode() ); } @@ -98,7 +98,7 @@ public function getCurrentSite(): EmulatedLegacySite private function getNodeAddressOfContextNode(): NodeAddress { $contentRepository = $this->contentRepositoryRegistry->get( - $this->node->subgraphIdentity->contentRepositoryIdentifier + $this->node->subgraphIdentity->contentRepositoryId ); return NodeAddressFactory::create($contentRepository)->createFromNode($this->node); } diff --git a/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyWorkspace.php b/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyWorkspace.php index 59a30f980f3..92b50bbc720 100644 --- a/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyWorkspace.php +++ b/Neos.EventSourcedContentRepository.LegacyApi/Classes/ContextInNodeBasedReadModel/EmulatedLegacyWorkspace.php @@ -5,7 +5,7 @@ namespace Neos\EventSourcedContentRepository\LegacyApi\ContextInNodeBasedReadModel; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; @@ -29,7 +29,7 @@ class EmulatedLegacyWorkspace protected ?Workspace $workspace; public function __construct( - private readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + private readonly ContentRepositoryId $contentRepositoryIdentifier, private readonly NodeAddress $nodeAddressOfContextNode ) { } diff --git a/Neos.EventSourcedContentRepository.LegacyApi/Classes/FlowQueryContextOperation/ContextOperation.php b/Neos.EventSourcedContentRepository.LegacyApi/Classes/FlowQueryContextOperation/ContextOperation.php index 8079a38e395..1d41996a33f 100644 --- a/Neos.EventSourcedContentRepository.LegacyApi/Classes/FlowQueryContextOperation/ContextOperation.php +++ b/Neos.EventSourcedContentRepository.LegacyApi/Classes/FlowQueryContextOperation/ContextOperation.php @@ -86,7 +86,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void /** @var Node $contextNode */ $contentRepository = $this->contentRepositoryRegistry - ->get($contextNode->subgraphIdentity->contentRepositoryIdentifier); + ->get($contextNode->subgraphIdentity->contentRepositoryId); $subgraphIdentity = $contextNode->subgraphIdentity; if (array_key_exists('invisibleContentShown', $targetContext)) { $invisibleContentShown = boolval($targetContext['invisibleContentShown']); @@ -101,26 +101,26 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void if (array_key_exists('workspaceName', $targetContext)) { $workspaceName = WorkspaceName::fromString($targetContext['workspaceName']); $contentRepository = $this->contentRepositoryRegistry->get( - $contextNode->subgraphIdentity->contentRepositoryIdentifier + $contextNode->subgraphIdentity->contentRepositoryId ); $workspace = $contentRepository->getWorkspaceFinder()->findOneByName($workspaceName); if (!is_null($workspace)) { - $subgraphIdentity = $subgraphIdentity->withContentStreamIdentifier( - $workspace->currentContentStreamIdentifier + $subgraphIdentity = $subgraphIdentity->withContentStreamId( + $workspace->currentContentStreamId ); } } $nodeInModifiedSubgraph = $contentRepository->getContentGraph() ->getSubgraph( - $subgraphIdentity->contentStreamIdentifier, + $subgraphIdentity->contentStreamId, $subgraphIdentity->dimensionSpacePoint, $subgraphIdentity->visibilityConstraints ) - ->findNodeByNodeAggregateIdentifier($contextNode->nodeAggregateIdentifier); + ->findNodeByNodeAggregateId($contextNode->nodeAggregateId); if ($nodeInModifiedSubgraph !== null) { - $output[$nodeInModifiedSubgraph->nodeAggregateIdentifier->__toString()] = $nodeInModifiedSubgraph; + $output[$nodeInModifiedSubgraph->nodeAggregateId->__toString()] = $nodeInModifiedSubgraph; } } diff --git a/Neos.Media.Browser/Classes/Controller/UsageController.php b/Neos.Media.Browser/Classes/Controller/UsageController.php index 4a595efacc1..34beaf31fb8 100644 --- a/Neos.Media.Browser/Classes/Controller/UsageController.php +++ b/Neos.Media.Browser/Classes/Controller/UsageController.php @@ -79,7 +79,7 @@ class UsageController extends ActionController */ public function relatedNodesAction(AssetInterface $asset) { - $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest())->contentRepositoryIdentifier; + $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest())->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $userWorkspaceName = $this->userService->getPersonalWorkspaceName(); $userWorkspace = $contentRepository->getWorkspaceFinder()->findOneByName(WorkspaceName::fromString($userWorkspaceName)); diff --git a/Neos.Neos/Classes/Aspects/PluginUriAspect.php b/Neos.Neos/Classes/Aspects/PluginUriAspect.php index 1e8d4568f76..d5e367a6bc1 100644 --- a/Neos.Neos/Classes/Aspects/PluginUriAspect.php +++ b/Neos.Neos/Classes/Aspects/PluginUriAspect.php @@ -84,7 +84,7 @@ public function rewritePluginViewUris(JoinPointInterface $joinPoint) if ($documentNode->nodeType->isOfType((string)NodeTypeNameFactory::forDocument())) { break; } - $documentNode = $subgraph->findParentNode($documentNode->nodeAggregateIdentifier); + $documentNode = $subgraph->findParentNode($documentNode->nodeAggregateId); } } @@ -139,7 +139,7 @@ public function generateUriForNode(ActionRequest $request, JoinPointInterface $j // store original node path to restore it after generating the uri $originalNodePath = $request->getMainRequest()->getArgument('node'); $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeAddress = $nodeAddressFactory->createFromNode($node); diff --git a/Neos.Neos/Classes/Command/WorkspaceCommandController.php b/Neos.Neos/Classes/Command/WorkspaceCommandController.php index 1fe0cfa936a..553f146eee3 100644 --- a/Neos.Neos/Classes/Command/WorkspaceCommandController.php +++ b/Neos.Neos/Classes/Command/WorkspaceCommandController.php @@ -22,13 +22,13 @@ use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\DiscardWorkspace; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishWorkspace; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Cli\CommandController; use Neos\Flow\Persistence\PersistenceManagerInterface; @@ -73,13 +73,13 @@ public function publishCommand( $verbose = false, $dryRun = false ) { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); if (!$dryRun) { $contentRepository->handle(new PublishWorkspace( WorkspaceName::fromString($workspace), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ))->block(); $this->outputLine( @@ -105,7 +105,7 @@ public function discardCommand( $verbose = false, $dryRun = false ) { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); if (!$dryRun) { @@ -113,7 +113,7 @@ public function discardCommand( $contentRepository->handle( DiscardWorkspace::create( WorkspaceName::fromString($workspace), - UserIdentifier::forSystemUser() + UserId::forSystemUser() ) )->block(); } catch (WorkspaceDoesNotExist $exception) { @@ -126,15 +126,15 @@ public function discardCommand( public function createRootCommand(string $name, string $contentRepositoryIdentifier = 'default'): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $contentRepository->handle(new CreateRootWorkspace( WorkspaceName::fromString($name), WorkspaceTitle::fromString($name), WorkspaceDescription::fromString($name), - UserIdentifier::forSystemUser(), - ContentStreamIdentifier::create() + UserId::forSystemUser(), + ContentStreamId::create() ))->block(); } @@ -158,7 +158,7 @@ public function createCommand( $owner = '', string $contentRepositoryIdentifier = 'default' ) { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); if ($owner === '') { @@ -177,8 +177,8 @@ public function createCommand( WorkspaceName::fromString($baseWorkspace), WorkspaceTitle::fromString($title ?: $workspace), WorkspaceDescription::fromString($description ?: $workspace), - UserIdentifier::forSystemUser(), - ContentStreamIdentifier::create(), + UserId::forSystemUser(), + ContentStreamId::create(), $workspaceOwner ))->block(); } catch (WorkspaceAlreadyExists $workspaceAlreadyExists) { @@ -189,7 +189,7 @@ public function createCommand( $this->quit(2); } - if ($workspaceOwner instanceof UserIdentifier) { + if ($workspaceOwner instanceof UserId) { $this->outputLine( 'Created a new workspace "%s", based on workspace "%s", owned by "%s".', [$workspace, $baseWorkspace, $owner] @@ -345,7 +345,7 @@ public function rebaseCommand($workspace, $baseWorkspace, string $contentReposit */ public function listCommand(string $contentRepositoryIdentifier = 'default') { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier); + $contentRepositoryIdentifier = ContentRepositoryId::fromString($contentRepositoryIdentifier); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $workspaces = $contentRepository->getWorkspaceFinder()->findAll(); diff --git a/Neos.Neos/Classes/Controller/Backend/ContentController.php b/Neos.Neos/Classes/Controller/Backend/ContentController.php index 234bdef2c2e..c62bcfbf2f5 100644 --- a/Neos.Neos/Classes/Controller/Backend/ContentController.php +++ b/Neos.Neos/Classes/Controller/Backend/ContentController.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; @@ -159,17 +159,17 @@ public function uploadAssetAction(Asset $asset, string $metadata, string $node, { $nodeAddressString = $node; $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $nodeAddress = NodeAddressFactory::create($contentRepository)->createFromUriString($nodeAddressString); $node = $contentRepository->getContentGraph() ->getSubgraph( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ) - ->findNodeByNodeAggregateIdentifier($nodeAddress->nodeAggregateIdentifier); + ->findNodeByNodeAggregateId($nodeAddress->nodeAggregateId); $this->response->setContentType('application/json'); @@ -395,7 +395,7 @@ protected function getAssetProperties(AssetInterface $asset) public function pluginViewsAction($identifier = null, $workspaceName = 'live', array $dimensions = []) { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $this->response->setContentType('application/json'); @@ -406,12 +406,12 @@ public function pluginViewsAction($identifier = null, $workspaceName = 'live', a } $subgraph = $contentRepository->getContentGraph() ->getSubgraph( - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, DimensionSpacePoint::fromArray($dimensions), VisibilityConstraints::withoutRestrictions() ); $node = $identifier - ? $subgraph->findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier::fromString($identifier)) + ? $subgraph->findNodeByNodeAggregateId(NodeAggregateId::fromString($identifier)) : null; $views = []; @@ -436,7 +436,7 @@ public function pluginViewsAction($identifier = null, $workspaceName = 'live', a continue; } $contentRepository = $this->contentRepositoryRegistry->get( - $documentNode->subgraphIdentity->contentRepositoryIdentifier + $documentNode->subgraphIdentity->contentRepositoryId ); $documentAddress = NodeAddressFactory::create($contentRepository)->createFromNode($documentNode); $uri = $this->uriBuilder @@ -467,7 +467,7 @@ public function pluginViewsAction($identifier = null, $workspaceName = 'live', a public function masterPluginsAction(string $workspaceName = 'live', array $dimensions = []) { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $this->response->setContentType('application/json'); @@ -484,7 +484,7 @@ public function masterPluginsAction(string $workspaceName = 'live', array $dimen continue; } $translationHelper = new TranslationHelper(); - $masterPlugins[(string)$pluginNode->nodeAggregateIdentifier] = $translationHelper->translate( + $masterPlugins[(string)$pluginNode->nodeAggregateId] = $translationHelper->translate( 'masterPlugins.nodeTypeOnPageLabel', null, [ @@ -506,7 +506,7 @@ final protected function findClosestDocumentNode(Node $node): ?Node return $node; } $node = $this->contentRepositoryRegistry->subgraphForNode($node) - ->findParentNode($node->nodeAggregateIdentifier); + ->findParentNode($node->nodeAggregateId); } return null; diff --git a/Neos.Neos/Classes/Controller/Backend/SchemaController.php b/Neos.Neos/Classes/Controller/Backend/SchemaController.php index 3e8755c93cf..e2a67fa7c22 100644 --- a/Neos.Neos/Classes/Controller/Backend/SchemaController.php +++ b/Neos.Neos/Classes/Controller/Backend/SchemaController.php @@ -45,7 +45,7 @@ class SchemaController extends ActionController public function nodeTypeSchemaAction(): string { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; if ($this->request->hasArgument('version')) { /** @var string $version */ diff --git a/Neos.Neos/Classes/Controller/Frontend/NodeController.php b/Neos.Neos/Classes/Controller/Frontend/NodeController.php index 97e518e7b96..031e47f7946 100644 --- a/Neos.Neos/Classes/Controller/Frontend/NodeController.php +++ b/Neos.Neos/Classes/Controller/Frontend/NodeController.php @@ -16,11 +16,11 @@ use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\ContentSubgraph; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\NodeType\NodeTypeConstraintParser; use Neos\Neos\FrontendRouting\NodeAddressFactory; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree; use Neos\Neos\FrontendRouting\NodeAddress; @@ -129,27 +129,27 @@ public function previewAction(string $node): void } $siteDetectionResult = SiteDetectionResult::fromRequest($this->request->getHttpRequest()); - $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryId); $nodeAddress = NodeAddressFactory::create($contentRepository)->createFromUriString($node); $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, $visibilityConstraints ); $site = $this->nodeSiteResolvingService->findSiteNodeForNodeAddress( $nodeAddress, - $siteDetectionResult->contentRepositoryIdentifier + $siteDetectionResult->contentRepositoryId ); if ($site === null) { throw new NodeNotFoundException("TODO: SITE NOT FOUND; should not happen (for address " . $nodeAddress); } - $this->fillCacheWithContentNodes($nodeAddress->nodeAggregateIdentifier, $subgraph, $contentRepository); + $this->fillCacheWithContentNodes($nodeAddress->nodeAggregateId, $subgraph, $contentRepository); - $nodeInstance = $subgraph->findNodeByNodeAggregateIdentifier($nodeAddress->nodeAggregateIdentifier); + $nodeInstance = $subgraph->findNodeByNodeAggregateId($nodeAddress->nodeAggregateId); if (is_null($nodeInstance)) { throw new NodeNotFoundException( @@ -197,7 +197,7 @@ public function previewAction(string $node): void public function showAction(string $node, bool $showInvisible = false): void { $siteDetectionResult = SiteDetectionResult::fromRequest($this->request->getHttpRequest()); - $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryId); $nodeAddress = NodeAddressFactory::create($contentRepository)->createFromUriString($node); if (!$nodeAddress->isInLiveWorkspace()) { @@ -210,22 +210,22 @@ public function showAction(string $node, bool $showInvisible = false): void } $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, $visibilityConstraints ); $site = $this->nodeSiteResolvingService->findSiteNodeForNodeAddress( $nodeAddress, - $siteDetectionResult->contentRepositoryIdentifier + $siteDetectionResult->contentRepositoryId ); if ($site === null) { throw new NodeNotFoundException("TODO: SITE NOT FOUND; should not happen (for address " . $nodeAddress); } - $this->fillCacheWithContentNodes($nodeAddress->nodeAggregateIdentifier, $subgraph, $contentRepository); + $this->fillCacheWithContentNodes($nodeAddress->nodeAggregateId, $subgraph, $contentRepository); - $nodeInstance = $subgraph->findNodeByNodeAggregateIdentifier($nodeAddress->nodeAggregateIdentifier); + $nodeInstance = $subgraph->findNodeByNodeAggregateId($nodeAddress->nodeAggregateId); if (is_null($nodeInstance)) { throw new NodeNotFoundException('The requested node does not exist', 1596191460); @@ -311,7 +311,7 @@ protected function handleShortcutNode(NodeAddress $nodeAddress, ContentRepositor } private function fillCacheWithContentNodes( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, ContentSubgraphInterface $subgraph, ContentRepository $contentRepository ): void { @@ -322,7 +322,7 @@ private function fillCacheWithContentNodes( $inMemoryCache = $subgraph->inMemoryCache; $subtree = $subgraph->findSubtrees( - NodeAggregateIdentifiers::fromArray([$nodeAggregateIdentifier]), + NodeAggregateIds::fromArray([$nodeAggregateIdentifier]), 10, NodeTypeConstraints::fromFilterString('!Neos.Neos:Document') ); @@ -334,9 +334,9 @@ private function fillCacheWithContentNodes( if (is_null($currentDocumentNode)) { return; } - $nodePathOfDocumentNode = $subgraph->findNodePath($currentDocumentNode->nodeAggregateIdentifier); + $nodePathOfDocumentNode = $subgraph->findNodePath($currentDocumentNode->nodeAggregateId); - $nodePathCache->add($currentDocumentNode->nodeAggregateIdentifier, $nodePathOfDocumentNode); + $nodePathCache->add($currentDocumentNode->nodeAggregateId, $nodePathOfDocumentNode); foreach ($subtree->children as $childSubtree) { self::fillCacheInternal( @@ -360,15 +360,15 @@ private static function fillCacheInternal( } $parentNodeIdentifierByChildNodeIdentifierCache - = $inMemoryCache->getParentNodeIdentifierByChildNodeIdentifierCache(); - $namedChildNodeByNodeIdentifierCache = $inMemoryCache->getNamedChildNodeByNodeIdentifierCache(); - $allChildNodesByNodeIdentifierCache = $inMemoryCache->getAllChildNodesByNodeIdentifierCache(); + = $inMemoryCache->getParentNodeIdByChildNodeIdCache(); + $namedChildNodeByNodeIdentifierCache = $inMemoryCache->getNamedChildNodeByNodeIdCache(); + $allChildNodesByNodeIdentifierCache = $inMemoryCache->getAllChildNodesByNodeIdCache(); $nodePathCache = $inMemoryCache->getNodePathCache(); if ($node->nodeName !== null) { $nodePath = $parentNodePath->appendPathSegment($node->nodeName); - $nodePathCache->add($node->nodeAggregateIdentifier, $nodePath); + $nodePathCache->add($node->nodeAggregateId, $nodePath); $namedChildNodeByNodeIdentifierCache->add( - $parentNode->nodeAggregateIdentifier, + $parentNode->nodeAggregateId, $node->nodeName, $node ); @@ -377,8 +377,8 @@ private static function fillCacheInternal( } $parentNodeIdentifierByChildNodeIdentifierCache->add( - $node->nodeAggregateIdentifier, - $parentNode->nodeAggregateIdentifier + $node->nodeAggregateId, + $parentNode->nodeAggregateId ); $allChildNodes = []; @@ -394,7 +394,7 @@ private static function fillCacheInternal( // TODO Explain why this is safe (Content can not contain other documents) $allChildNodesByNodeIdentifierCache->add( - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, NodeTypeConstraintsWithSubNodeTypes::allowAll(), $allChildNodes ); diff --git a/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php b/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php index 79190efad95..9b1f6a20ded 100644 --- a/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php +++ b/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php @@ -30,7 +30,7 @@ class DimensionController extends AbstractModuleController public function indexAction(string $type = 'intraDimension', string $dimensionSpacePointHash = null): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $dimensionControllerInternals = $this->contentRepositoryRegistry->getService( $contentRepositoryIdentifier, new DimensionControllerInternalsFactory() diff --git a/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php b/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php index 57bfa063655..b0184b11fa3 100755 --- a/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php +++ b/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php @@ -26,7 +26,7 @@ use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Error\Messages\Message; use Neos\Flow\Log\Utility\LogEnvironment; @@ -181,7 +181,7 @@ public function updateSiteAction(Site $site, $newSiteNodeName) if ($site->getNodeName() !== $newSiteNodeName) { $this->redirect('index'); } - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString( + $contentRepositoryIdentifier = ContentRepositoryId::fromString( $site->getConfiguration()['contentRepository'] ?? throw new \RuntimeException( 'There is no content repository identifier configured in Sites configuration in Settings.yaml:' @@ -200,7 +200,7 @@ public function updateSiteAction(Site $site, $newSiteNodeName) try { $sitesNode = $contentRepository->getContentGraph()->findRootNodeAggregateByType( - $liveWorkspace->currentContentStreamIdentifier, + $liveWorkspace->currentContentStreamId, NodeTypeName::fromString('Neos.Neos:Sites') ); } catch (\Exception $exception) { @@ -223,15 +223,15 @@ public function updateSiteAction(Site $site, $newSiteNodeName) /** @var NodeAggregate[] $siteNodeAggregates */ /** @var Workspace $workspace */ $siteNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregatesByName( - $workspace->currentContentStreamIdentifier, - $sitesNode->nodeAggregateIdentifier, + $workspace->currentContentStreamId, + $sitesNode->nodeAggregateId, $site->getNodeName()->toNodeName() ); foreach ($siteNodeAggregates as $siteNodeAggregate) { $contentRepository->handle(new ChangeNodeAggregateName( - $workspace->currentContentStreamIdentifier, - $siteNodeAggregate->nodeAggregateIdentifier, + $workspace->currentContentStreamId, + $siteNodeAggregate->nodeAggregateId, NodeName::fromString($newSiteNodeName), $this->persistenceManager->getIdentifierByObject($currentUser) )); @@ -262,7 +262,7 @@ public function newSiteAction(Site $site = null) { // This is not 100% correct, but it is as good as we can get it to work right now $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); diff --git a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php index c026c503851..667ea4d8a81 100644 --- a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php +++ b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php @@ -15,8 +15,8 @@ namespace Neos\Neos\Controller\Module\Management; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifiersToPublishOrDiscard; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdentifierToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdsToPublishOrDiscard; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Exception\WorkspaceAlreadyExists; use Neos\Neos\PendingChangesProjection\ChangeProjection; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; @@ -28,9 +28,9 @@ use Neos\ContentRepository\Core\Feature\WorkspacePublication\Command\PublishWorkspace; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\Neos\FrontendRouting\NodeAddressFactory; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -108,7 +108,7 @@ class WorkspacesController extends AbstractModuleController public function indexAction() { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $currentAccount = $this->securityContext->getAccount(); @@ -157,7 +157,7 @@ public function indexAction() public function showAction(WorkspaceName $workspace): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $workspacesControllerInternals = $this->contentRepositoryRegistry->getService( $contentRepositoryIdentifier, @@ -188,7 +188,7 @@ public function showAction(WorkspaceName $workspace): void public function newAction() { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $this->view->assign('baseWorkspaceOptions', $this->prepareBaseWorkspaceOptions($contentRepository)); @@ -212,7 +212,7 @@ public function createAction( WorkspaceDescription $description ) { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $workspaceName = WorkspaceName::fromString( @@ -239,7 +239,7 @@ public function createAction( $title, $description, $currentUserIdentifier, - ContentStreamIdentifier::create(), + ContentStreamId::create(), $visibility === 'private' ? $currentUserIdentifier : null ) )->block(); @@ -264,7 +264,7 @@ public function createAction( public function editAction(WorkspaceName $workspace) { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $workspace = $contentRepository->getWorkspaceFinder()->findOneByName($workspace); @@ -333,7 +333,7 @@ public function updateAction(Workspace $workspace) public function deleteAction(Workspace $workspace) { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); if ($workspace->isPersonalWorkspace()) { @@ -409,7 +409,7 @@ public function deleteAction(Workspace $workspace) public function rebaseAndRedirectAction(Node $targetNode, Workspace $targetWorkspace): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $currentAccount = $this->securityContext->getAccount(); @@ -438,9 +438,9 @@ public function rebaseAndRedirectAction(Node $targetNode, Workspace $targetWorks */ $targetNodeAddressInPersonalWorkspace = new NodeAddress( - $personalWorkspace->currentContentStreamIdentifier, + $personalWorkspace->currentContentStreamId, $targetNode->subgraphIdentity->dimensionSpacePoint, - $targetNode->nodeAggregateIdentifier, + $targetNode->nodeAggregateId, $personalWorkspace->workspaceName ); @@ -474,19 +474,19 @@ public function rebaseAndRedirectAction(Node $targetNode, Workspace $targetWorks public function publishNodeAction(NodeAddress $node, WorkspaceName $selectedWorkspace): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $command = PublishIndividualNodesFromWorkspace::create( $selectedWorkspace, - NodeIdentifiersToPublishOrDiscard::create( - new NodeIdentifierToPublishOrDiscard( - $node->contentStreamIdentifier, - $node->nodeAggregateIdentifier, + NodeIdsToPublishOrDiscard::create( + new NodeIdToPublishOrDiscard( + $node->contentStreamId, + $node->nodeAggregateId, $node->dimensionSpacePoint ) ), - UserIdentifier::fromString($this->securityContext->getAccount()->getAccountIdentifier()) + UserId::fromString($this->securityContext->getAccount()->getAccountIdentifier()) ); $contentRepository->handle($command) ->block(); @@ -511,19 +511,19 @@ public function publishNodeAction(NodeAddress $node, WorkspaceName $selectedWork public function discardNodeAction(NodeAddress $node, WorkspaceName $selectedWorkspace): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $command = DiscardIndividualNodesFromWorkspace::create( $selectedWorkspace, - NodeIdentifiersToPublishOrDiscard::create( - new NodeIdentifierToPublishOrDiscard( - $node->contentStreamIdentifier, - $node->nodeAggregateIdentifier, + NodeIdsToPublishOrDiscard::create( + new NodeIdToPublishOrDiscard( + $node->contentStreamId, + $node->nodeAggregateId, $node->dimensionSpacePoint ) ), - UserIdentifier::fromString($this->securityContext->getAccount()->getAccountIdentifier()) + UserId::fromString($this->securityContext->getAccount()->getAccountIdentifier()) ); $contentRepository->handle($command) ->block(); @@ -551,16 +551,16 @@ public function discardNodeAction(NodeAddress $node, WorkspaceName $selectedWork public function publishOrDiscardNodesAction(array $nodes, string $action, WorkspaceName $selectedWorkspace): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $nodesToPublishOrDiscard = []; $nodeAddressFactory = NodeAddressFactory::create($contentRepository); foreach ($nodes as $node) { $nodeAddress = $nodeAddressFactory->createFromUriString($node); - $nodesToPublishOrDiscard[] = new NodeIdentifierToPublishOrDiscard( - $nodeAddress->contentStreamIdentifier, - $nodeAddress->nodeAggregateIdentifier, + $nodesToPublishOrDiscard[] = new NodeIdToPublishOrDiscard( + $nodeAddress->contentStreamId, + $nodeAddress->nodeAggregateId, $nodeAddress->dimensionSpacePoint ); } @@ -569,8 +569,8 @@ public function publishOrDiscardNodesAction(array $nodes, string $action, Worksp case 'publish': $command = PublishIndividualNodesFromWorkspace::create( $selectedWorkspace, - NodeIdentifiersToPublishOrDiscard::create(...$nodesToPublishOrDiscard), - UserIdentifier::fromString($this->securityContext->getAccount()->getAccountIdentifier()) + NodeIdsToPublishOrDiscard::create(...$nodesToPublishOrDiscard), + UserId::fromString($this->securityContext->getAccount()->getAccountIdentifier()) ); $contentRepository->handle($command) ->block(); @@ -586,8 +586,8 @@ public function publishOrDiscardNodesAction(array $nodes, string $action, Worksp case 'discard': $command = DiscardIndividualNodesFromWorkspace::create( $selectedWorkspace, - NodeIdentifiersToPublishOrDiscard::create(...$nodesToPublishOrDiscard), - UserIdentifier::fromString($this->securityContext->getAccount()->getAccountIdentifier()) + NodeIdsToPublishOrDiscard::create(...$nodesToPublishOrDiscard), + UserId::fromString($this->securityContext->getAccount()->getAccountIdentifier()) ); $contentRepository->handle($command) ->block(); @@ -613,7 +613,7 @@ public function publishOrDiscardNodesAction(array $nodes, string $action, Worksp public function publishWorkspaceAction(WorkspaceName $workspace): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $initiatingUserIdentifier = $this->domainUserService->getCurrentUserIdentifier(); @@ -652,7 +652,7 @@ public function publishWorkspaceAction(WorkspaceName $workspace): void public function discardWorkspaceAction(WorkspaceName $workspace): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $initiatingUserIdentifier = $this->domainUserService->getCurrentUserIdentifier(); @@ -712,7 +712,7 @@ protected function computeSiteChanges(Workspace $selectedWorkspace, ContentRepos $siteChanges = []; $changes = $contentRepository->projectionState(ChangeProjection::class) ->findByContentStreamIdentifier( - $selectedWorkspace->currentContentStreamIdentifier + $selectedWorkspace->currentContentStreamId ); foreach ($changes as $change) { @@ -725,7 +725,7 @@ protected function computeSiteChanges(Workspace $selectedWorkspace, ContentRepos // // This is safe because the UI basically shows what would be removed once the deletion is published. $baseWorkspace = $this->getBaseWorkspaceWhenSureItExists($selectedWorkspace, $contentRepository); - $contentStreamIdentifier = $baseWorkspace->currentContentStreamIdentifier; + $contentStreamIdentifier = $baseWorkspace->currentContentStreamId; } $subgraph = $contentRepository->getContentGraph()->getSubgraph( $contentStreamIdentifier, @@ -733,9 +733,9 @@ protected function computeSiteChanges(Workspace $selectedWorkspace, ContentRepos VisibilityConstraints::withoutRestrictions() ); - $node = $subgraph->findNodeByNodeAggregateIdentifier($change->nodeAggregateIdentifier); + $node = $subgraph->findNodeByNodeAggregateId($change->nodeAggregateIdentifier); if ($node) { - $pathParts = explode('/', (string)$subgraph->findNodePath($node->nodeAggregateIdentifier)); + $pathParts = explode('/', (string)$subgraph->findNodePath($node->nodeAggregateId)); if (count($pathParts) > 2) { $siteNodeName = $pathParts[2]; $document = null; @@ -746,7 +746,7 @@ protected function computeSiteChanges(Workspace $selectedWorkspace, ContentRepos break; } $closestDocumentNode = $subgraph->findParentNode( - $closestDocumentNode->nodeAggregateIdentifier + $closestDocumentNode->nodeAggregateId ); } @@ -756,12 +756,12 @@ protected function computeSiteChanges(Workspace $selectedWorkspace, ContentRepos assert($document instanceof Node); $documentPath = implode('/', array_slice(explode( '/', - (string)$subgraph->findNodePath($document->nodeAggregateIdentifier) + (string)$subgraph->findNodePath($document->nodeAggregateId) ), 3)); $relativePath = str_replace( sprintf('//%s/%s', $siteNodeName, $documentPath), '', - (string)$subgraph->findNodePath($node->nodeAggregateIdentifier) + (string)$subgraph->findNodePath($node->nodeAggregateId) ); if (!isset($siteChanges[$siteNodeName]['siteNode'])) { $siteChanges[$siteNodeName]['siteNode'] @@ -814,7 +814,7 @@ protected function computeSiteChanges(Workspace $selectedWorkspace, ContentRepos */ protected function getOriginalNode( Node $modifiedNode, - ContentStreamIdentifier $baseContentStreamIdentifier, + ContentStreamId $baseContentStreamIdentifier, ContentRepository $contentRepository ): ?Node { $baseSubgraph = $contentRepository->getContentGraph()->getSubgraph( @@ -822,7 +822,7 @@ protected function getOriginalNode( $modifiedNode->subgraphIdentity->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); - $node = $baseSubgraph->findNodeByNodeAggregateIdentifier($modifiedNode->nodeAggregateIdentifier); + $node = $baseSubgraph->findNodeByNodeAggregateId($modifiedNode->nodeAggregateId); return $node; } @@ -835,16 +835,16 @@ protected function getOriginalNode( */ protected function renderContentChanges( Node $changedNode, - ContentStreamIdentifier $contentStreamIdentifierOfOriginalNode, + ContentStreamId $contentStreamIdentifierOfOriginalNode, ContentRepository $contentRepository ): array { - $currentWorkspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamIdentifier( + $currentWorkspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId( $contentStreamIdentifierOfOriginalNode ); $originalNode = null; if ($currentWorkspace !== null) { $baseWorkspace = $this->getBaseWorkspaceWhenSureItExists($currentWorkspace, $contentRepository); - $baseContentStreamIdentifier = $baseWorkspace->currentContentStreamIdentifier; + $baseContentStreamIdentifier = $baseWorkspace->currentContentStreamId; $originalNode = $this->getOriginalNode($changedNode, $baseContentStreamIdentifier, $contentRepository); } diff --git a/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php b/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php index 0528952eac6..528defce014 100644 --- a/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php +++ b/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php @@ -58,7 +58,7 @@ class ContentDimensionsController extends ActionController public function indexAction() { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $controllerInternals = $this->contentRepositoryRegistry->getService( $contentRepositoryIdentifier, new ContentDimensionsControllerInternalsFactory() diff --git a/Neos.Neos/Classes/Controller/Service/NodesController.php b/Neos.Neos/Classes/Controller/Service/NodesController.php index 9258a334a29..ed8c41d7dad 100644 --- a/Neos.Neos/Classes/Controller/Service/NodesController.php +++ b/Neos.Neos/Classes/Controller/Service/NodesController.php @@ -22,15 +22,15 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\Projection\ContentGraph\SearchTerm; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\ContentRepository\Core\NodeType\NodeTypeConstraintParser; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints; use Neos\ContentRepository\Core\NodeType\NodeTypeNames; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\ContentRepositoryRegistry\Factory\ProjectionCatchUpTrigger\CatchUpTriggerWithSynchronousOption; @@ -110,7 +110,7 @@ public function indexAction( string $contextNode = null ): void { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); @@ -130,22 +130,22 @@ public function indexAction( ); } $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, DimensionSpacePoint::fromLegacyDimensionArray($dimensions), VisibilityConstraints::withoutRestrictions() // we are in a backend controller. ); } else { $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() // we are in a backend controller. ); } if ($nodeIdentifiers === [] && !is_null($nodeAddress)) { - $entryNode = $subgraph->findNodeByNodeAggregateIdentifier($nodeAddress->nodeAggregateIdentifier); + $entryNode = $subgraph->findNodeByNodeAggregateId($nodeAddress->nodeAggregateId); $nodes = !is_null($entryNode) ? $subgraph->findDescendants( - [$entryNode->nodeAggregateIdentifier], + [$entryNode->nodeAggregateId], NodeTypeConstraints::create( NodeTypeNames::fromStringArray($nodeTypes), NodeTypeNames::createEmpty() @@ -159,8 +159,8 @@ public function indexAction( $nodes = []; foreach ($nodeIdentifiers as $nodeAggregateIdentifier) { - $node = $subgraph->findNodeByNodeAggregateIdentifier( - NodeAggregateIdentifier::fromString($nodeAggregateIdentifier) + $node = $subgraph->findNodeByNodeAggregateId( + NodeAggregateId::fromString($nodeAggregateIdentifier) ); if ($node !== null) { $nodes[] = $node; @@ -182,9 +182,9 @@ public function indexAction( */ public function showAction(string $identifier, string $workspaceName = 'live', array $dimensions = []): void { - $identifier = NodeAggregateIdentifier::fromString($identifier); + $identifier = NodeAggregateId::fromString($identifier); $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $workspace = $contentRepository->getWorkspaceFinder() @@ -194,17 +194,17 @@ public function showAction(string $identifier, string $workspaceName = 'live', a $dimensionSpacePoint = DimensionSpacePoint::fromLegacyDimensionArray($dimensions); $subgraph = $contentRepository->getContentGraph() ->getSubgraph( - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, $dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); - $node = $subgraph->findNodeByNodeAggregateIdentifier($identifier); + $node = $subgraph->findNodeByNodeAggregateId($identifier); if ($node === null) { $this->addExistingNodeVariantInformationToResponse( $identifier, - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, $dimensionSpacePoint, $contentRepository ); @@ -251,9 +251,9 @@ public function createAction( array $dimensions = [], array $sourceDimensions = [] ): void { - $identifier = NodeAggregateIdentifier::fromString($identifier); + $identifier = NodeAggregateId::fromString($identifier); $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $workspace = $contentRepository->getWorkspaceFinder() @@ -262,14 +262,14 @@ public function createAction( $sourceSubgraph = $contentRepository->getContentGraph() ->getSubgraph( - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, DimensionSpacePoint::fromLegacyDimensionArray($sourceDimensions), VisibilityConstraints::withoutRestrictions() ); $targetSubgraph = $contentRepository->getContentGraph() ->getSubgraph( - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, DimensionSpacePoint::fromLegacyDimensionArray($dimensions), VisibilityConstraints::withoutRestrictions() ); @@ -299,14 +299,14 @@ public function createAction( * or is really non-existent */ protected function addExistingNodeVariantInformationToResponse( - NodeAggregateIdentifier $identifier, - ContentStreamIdentifier $contentStreamIdentifier, + NodeAggregateId $identifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, ContentRepository $contentRepository ): void { $contentGraph = $contentRepository->getContentGraph(); $nodeTypeManager = $contentRepository->getNodeTypeManager(); - $nodeAggregate = $contentGraph->findNodeAggregateByIdentifier($contentStreamIdentifier, $identifier); + $nodeAggregate = $contentGraph->findNodeAggregateById($contentStreamIdentifier, $identifier); if ($nodeAggregate && $nodeAggregate->coveredDimensionSpacePoints->count() > 0) { $this->response->setHttpHeader('X-Neos-Node-Exists-In-Other-Dimensions', 'true'); @@ -330,7 +330,7 @@ protected function addExistingNodeVariantInformationToResponse( $missingNodesOnRootline++; } - $identifier = $parentAggregate->nodeAggregateIdentifier; + $identifier = $parentAggregate->nodeAggregateId; } // TODO: possibly off-by-one-or-two errors :D @@ -359,7 +359,7 @@ private static function firstNodeAggregate(iterable $nodeAggregates): ?NodeAggre /** * Adopt (translate) the given node and parents that are not yet visible to the given context * - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateIdentifier * @param ContentSubgraphInterface $sourceSubgraph * @param ContentSubgraphInterface $targetSubgraph * @param ContentRepository $contentRepository @@ -367,44 +367,44 @@ private static function firstNodeAggregate(iterable $nodeAggregates): ?NodeAggre * @return void */ protected function adoptNodeAndParents( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateIdentifier, ContentSubgraphInterface $sourceSubgraph, ContentSubgraphInterface $targetSubgraph, ContentRepository $contentRepository, bool $copyContent ) { - assert($sourceSubgraph->getContentStreamIdentifier()->equals($targetSubgraph->getContentStreamIdentifier())); + assert($sourceSubgraph->getContentStreamId()->equals($targetSubgraph->getContentStreamId())); $identifiersFromRootlineToTranslate = []; while ( $nodeAggregateIdentifier - && $targetSubgraph->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier) === null + && $targetSubgraph->findNodeByNodeAggregateId($nodeAggregateIdentifier) === null ) { $identifiersFromRootlineToTranslate[] = $nodeAggregateIdentifier; $nodeAggregateIdentifier = $sourceSubgraph->findParentNode($nodeAggregateIdentifier) - ?->nodeAggregateIdentifier; + ?->nodeAggregateId; } // $identifiersFromRootlineToTranslate is now bottom-to-top; so we need to reverse // them to know what we need to create. // TODO: TEST THAT AUTO CREATED CHILD NODES WORK (though this should not have influence) foreach (array_reverse($identifiersFromRootlineToTranslate) as $identifier) { - assert($identifier instanceof NodeAggregateIdentifier); + assert($identifier instanceof NodeAggregateId); // NOTE: for creating node variants, we need to find the ORIGIN DSP // of the source node (in order to unambiguously identify it); // so we need to load it from the source subgraph - $sourceNode = $sourceSubgraph->findNodeByNodeAggregateIdentifier($identifier); + $sourceNode = $sourceSubgraph->findNodeByNodeAggregateId($identifier); if (!$sourceNode) { throw new \RuntimeException('Source node for Node Aggregate ID ' . $identifier . ' not found. This should never happen.', 1660905374); } $contentRepository->handle( new CreateNodeVariant( - $sourceSubgraph->getContentStreamIdentifier(), + $sourceSubgraph->getContentStreamId(), $identifier, $sourceNode->originDimensionSpacePoint, OriginDimensionSpacePoint::fromDimensionSpacePoint($targetSubgraph->getDimensionSpacePoint()), - UserIdentifier::forSystemUser() // TODO: USE THE CORRECT USER HERE + UserId::forSystemUser() // TODO: USE THE CORRECT USER HERE ) )->block(); @@ -422,7 +422,7 @@ protected function adoptNodeAndParents( } private function createNodeVariantsForChildNodes( - NodeAggregateIdentifier $parentNodeId, + NodeAggregateId $parentNodeId, NodeTypeConstraints $constraints, ContentSubgraphInterface $sourceSubgraph, ContentSubgraphInterface $targetSubgraph, @@ -434,17 +434,17 @@ private function createNodeVariantsForChildNodes( // TODO: DOES THIS MAKE SENSE? $contentRepository->handle( new CreateNodeVariant( - $sourceSubgraph->getContentStreamIdentifier(), - $childNode->nodeAggregateIdentifier, + $sourceSubgraph->getContentStreamId(), + $childNode->nodeAggregateId, $childNode->originDimensionSpacePoint, OriginDimensionSpacePoint::fromDimensionSpacePoint($targetSubgraph->getDimensionSpacePoint()), - UserIdentifier::forSystemUser() // TODO: USE THE CORRECT USER HERE + UserId::forSystemUser() // TODO: USE THE CORRECT USER HERE ) )->block(); } $this->createNodeVariantsForChildNodes( - $childNode->nodeAggregateIdentifier, + $childNode->nodeAggregateId, $constraints, $sourceSubgraph, $targetSubgraph, diff --git a/Neos.Neos/Classes/Domain/Model/NodeCacheEntryIdentifier.php b/Neos.Neos/Classes/Domain/Model/NodeCacheEntryIdentifier.php index bcd75c80e52..6aeadc31d3c 100644 --- a/Neos.Neos/Classes/Domain/Model/NodeCacheEntryIdentifier.php +++ b/Neos.Neos/Classes/Domain/Model/NodeCacheEntryIdentifier.php @@ -32,9 +32,9 @@ private function __construct( public static function fromNode(Node $node): self { - return new self('Node_' . $node->subgraphIdentity->contentStreamIdentifier->getValue() + return new self('Node_' . $node->subgraphIdentity->contentStreamId->getValue() . '_' . $node->subgraphIdentity->dimensionSpacePoint->hash - . '_' . $node->nodeAggregateIdentifier->getValue()); + . '_' . $node->nodeAggregateId->getValue()); } public function getCacheEntryIdentifier(): string diff --git a/Neos.Neos/Classes/Domain/Service/FusionService.php b/Neos.Neos/Classes/Domain/Service/FusionService.php index 9d2fe6b381b..2ebf32c0396 100644 --- a/Neos.Neos/Classes/Domain/Service/FusionService.php +++ b/Neos.Neos/Classes/Domain/Service/FusionService.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Mvc\Controller\ControllerContext; use Neos\Flow\ObjectManagement\ObjectManagerInterface; @@ -153,7 +153,7 @@ public function getMergedFusionObjectTree(Node $startNode) $mergedFusionCode = ''; $mergedFusionCode .= $this->generateNodeTypeDefinitions( - $startNode->subgraphIdentity->contentRepositoryIdentifier + $startNode->subgraphIdentity->contentRepositoryId ); $mergedFusionCode .= $this->getFusionIncludes($this->prepareAutoIncludeFusion()); $mergedFusionCode .= $this->getFusionIncludes($this->prependFusionIncludes); @@ -188,7 +188,7 @@ protected function readExternalFusionFile($pathAndFilename) * @return string * @throws \Neos\Neos\Domain\Exception */ - protected function generateNodeTypeDefinitions(ContentRepositoryIdentifier $contentRepositoryIdentifier) + protected function generateNodeTypeDefinitions(ContentRepositoryId $contentRepositoryIdentifier) { $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $code = ''; diff --git a/Neos.Neos/Classes/Domain/Service/NodeSiteResolvingService.php b/Neos.Neos/Classes/Domain/Service/NodeSiteResolvingService.php index 8c4be8b0cad..5d007733e74 100644 --- a/Neos.Neos/Classes/Domain/Service/NodeSiteResolvingService.php +++ b/Neos.Neos/Classes/Domain/Service/NodeSiteResolvingService.php @@ -14,7 +14,7 @@ namespace Neos\Neos\Domain\Service; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\Neos\FrontendRouting\NodeAddress; @@ -33,19 +33,19 @@ class NodeSiteResolvingService public function findSiteNodeForNodeAddress( NodeAddress $nodeAddress, - ContentRepositoryIdentifier $contentRepositoryIdentifier + ContentRepositoryId $contentRepositoryIdentifier ): ?Node { $contentRepository = $this->contentRepositoryRegistry->get( $contentRepositoryIdentifier ); $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, $nodeAddress->isInLiveWorkspace() ? VisibilityConstraints::frontend() : VisibilityConstraints::withoutRestrictions() ); - $node = $subgraph->findNodeByNodeAggregateIdentifier($nodeAddress->nodeAggregateIdentifier); + $node = $subgraph->findNodeByNodeAggregateId($nodeAddress->nodeAggregateId); if (is_null($node)) { return null; } @@ -56,7 +56,7 @@ public function findSiteNodeForNodeAddress( return $previousNode; } $previousNode = $node; - } while ($node = $subgraph->findParentNode($node->nodeAggregateIdentifier)); + } while ($node = $subgraph->findParentNode($node->nodeAggregateId)); // no Site node found at rootline return null; diff --git a/Neos.Neos/Classes/Domain/Service/SiteNodeUtility.php b/Neos.Neos/Classes/Domain/Service/SiteNodeUtility.php index f2b32380777..a523735beb8 100644 --- a/Neos.Neos/Classes/Domain/Service/SiteNodeUtility.php +++ b/Neos.Neos/Classes/Domain/Service/SiteNodeUtility.php @@ -16,11 +16,11 @@ namespace Neos\Neos\Domain\Service; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Annotations as Flow; use Neos\Neos\Domain\Model\Site; @@ -50,15 +50,15 @@ public function findSiteNode(Node $node): Node return $previousNode; } $previousNode = $node; - } while ($node = $subgraph->findParentNode($node->nodeAggregateIdentifier)); + } while ($node = $subgraph->findParentNode($node->nodeAggregateId)); // no Site node found at rootline throw new \RuntimeException('No site node found!'); } public function findCurrentSiteNode( - ContentRepositoryIdentifier $contentRepositoryIdentifier, - ContentStreamIdentifier $contentStreamIdentifier, + ContentRepositoryId $contentRepositoryIdentifier, + ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, VisibilityConstraints $visibilityConstraints ): Node { @@ -80,10 +80,10 @@ public function findCurrentSiteNode( $contentStreamIdentifier, NodeTypeName::fromString('Neos.Neos:Sites') ); - $sitesNode = $subgraph->findNodeByNodeAggregateIdentifier($rootNodeAggregate->nodeAggregateIdentifier); + $sitesNode = $subgraph->findNodeByNodeAggregateId($rootNodeAggregate->nodeAggregateId); if ($sitesNode) { $siteNode = $subgraph->findChildNodeConnectedThroughEdgeName( - $sitesNode->nodeAggregateIdentifier, + $sitesNode->nodeAggregateId, $site->getNodeName()->toNodeName() ); if ($siteNode instanceof Node) { diff --git a/Neos.Neos/Classes/Domain/Service/SiteService.php b/Neos.Neos/Classes/Domain/Service/SiteService.php index 006d7562397..60c1e7cf07e 100644 --- a/Neos.Neos/Classes/Domain/Service/SiteService.php +++ b/Neos.Neos/Classes/Domain/Service/SiteService.php @@ -16,9 +16,9 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Persistence\PersistenceManagerInterface; use Neos\Media\Domain\Model\Asset; @@ -76,7 +76,7 @@ class SiteService */ public function pruneSite(Site $site): void { - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString( + $contentRepositoryIdentifier = ContentRepositoryId::fromString( $site->getConfiguration()['contentRepository'] ?? throw new \RuntimeException( 'There is no content repository identifier configured in Sites configuration in Settings.yaml:' @@ -180,10 +180,10 @@ public function createSite( //return $site; // TODO: FIX ME (CODE BELOW) $currentUserIdentifier = $this->domainUserService->getCurrentUserIdentifier(); if (is_null($currentUserIdentifier)) { - $currentUserIdentifier = UserIdentifier::forSystemUser(); + $currentUserIdentifier = UserId::forSystemUser(); } - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString( + $contentRepositoryIdentifier = ContentRepositoryId::fromString( $site->getConfiguration()['contentRepository'] ?? throw new \RuntimeException( 'There is no content repository identifier configured in Sites configuration in Settings.yaml:' diff --git a/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php b/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php index f8d9a957ae8..84da5e0d427 100644 --- a/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php +++ b/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php @@ -30,12 +30,12 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; use Neos\ContentRepository\Core\Service\ContentRepositoryBootstrapper; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -67,14 +67,14 @@ public function removeSiteNode(SiteNodeName $siteNodeName): void } $contentGraph = $this->contentRepository->getContentGraph(); - foreach ($this->contentRepository->getContentStreamFinder()->findAllIdentifiers() as $contentStreamIdentifier) { + foreach ($this->contentRepository->getContentStreamFinder()->findAllIds() as $contentStreamIdentifier) { $sitesNodeAggregate = $contentGraph->findRootNodeAggregateByType( $contentStreamIdentifier, NodeTypeName::fromString('Neos.Neos:Sites') ); $siteNodeAggregates = $contentGraph->findChildNodeAggregatesByName( $contentStreamIdentifier, - $sitesNodeAggregate->nodeAggregateIdentifier, + $sitesNodeAggregate->nodeAggregateId, $siteNodeName->toNodeName() ); @@ -82,16 +82,16 @@ public function removeSiteNode(SiteNodeName $siteNodeName): void assert($siteNodeAggregate instanceof NodeAggregate); $this->contentRepository->handle(new RemoveNodeAggregate( $contentStreamIdentifier, - $siteNodeAggregate->nodeAggregateIdentifier, + $siteNodeAggregate->nodeAggregateId, $arbitraryDimensionSpacePoint, NodeVariantSelectionStrategy::STRATEGY_ALL_VARIANTS, - UserIdentifier::forSystemUser() + UserId::forSystemUser() )); } } } - public function createSiteNode(Site $site, string $nodeTypeName, UserIdentifier $currentUserIdentifier): void + public function createSiteNode(Site $site, string $nodeTypeName, UserId $currentUserIdentifier): void { $bootstrapper = ContentRepositoryBootstrapper::create($this->contentRepository); $liveContentStreamIdentifier = $bootstrapper->getOrCreateLiveContentStream(); @@ -117,7 +117,7 @@ public function createSiteNode(Site $site, string $nodeTypeName, UserIdentifier } $arbitraryRootDimensionSpacePoint = array_shift($rootDimensionSpacePoints); - $siteNodeAggregateIdentifier = NodeAggregateIdentifier::create(); + $siteNodeAggregateIdentifier = NodeAggregateId::create(); $this->contentRepository->handle(new CreateNodeAggregateWithNode( $liveContentStreamIdentifier, $siteNodeAggregateIdentifier, diff --git a/Neos.Neos/Classes/Domain/Service/UserService.php b/Neos.Neos/Classes/Domain/Service/UserService.php index 4cb2380c9ae..fe3c043de45 100644 --- a/Neos.Neos/Classes/Domain/Service/UserService.php +++ b/Neos.Neos/Classes/Domain/Service/UserService.php @@ -15,7 +15,7 @@ namespace Neos\Neos\Domain\Service; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Persistence\Exception\IllegalObjectTypeException; use Neos\Flow\Persistence\PersistenceManagerInterface; @@ -270,12 +270,12 @@ public function getCurrentUser(): ?User return $user; } - public function getCurrentUserIdentifier(): ?UserIdentifier + public function getCurrentUserIdentifier(): ?UserId { $currentUser = $this->getCurrentUser(); return $currentUser - ? UserIdentifier::fromString($this->persistenceManager->getIdentifierByObject($currentUser)) + ? UserId::fromString($this->persistenceManager->getIdentifierByObject($currentUser)) : null; } diff --git a/Neos.Neos/Classes/Eel/FlowQueryOperations/SortOperation.php b/Neos.Neos/Classes/Eel/FlowQueryOperations/SortOperation.php index 95cbe89fa63..fe2b857a95c 100644 --- a/Neos.Neos/Classes/Eel/FlowQueryOperations/SortOperation.php +++ b/Neos.Neos/Classes/Eel/FlowQueryOperations/SortOperation.php @@ -123,8 +123,8 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) $propertyValue = $propertyValue->getTimestamp(); } - $sortSequence[(string)$node->nodeAggregateIdentifier] = $propertyValue; - $nodesByIdentifier[(string)$node->nodeAggregateIdentifier] = $node; + $sortSequence[(string)$node->nodeAggregateId] = $propertyValue; + $nodesByIdentifier[(string)$node->nodeAggregateId] = $node; } // Create the sort sequence diff --git a/Neos.Neos/Classes/EventLog/Integrations/ContentRepositoryIntegrationService.php b/Neos.Neos/Classes/EventLog/Integrations/ContentRepositoryIntegrationService.php index 592adf1bfcc..1fc2ec1bd52 100644 --- a/Neos.Neos/Classes/EventLog/Integrations/ContentRepositoryIntegrationService.php +++ b/Neos.Neos/Classes/EventLog/Integrations/ContentRepositoryIntegrationService.php @@ -413,14 +413,14 @@ public function afterNodePublishing(Node $node, Workspace $targetWorkspace) $subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); $documentNode = $node; while ($documentNode !== null && !$documentNode->nodeType->isAggregate()) { - $documentNode = $subgraph->findParentNode($documentNode->nodeAggregateIdentifier); + $documentNode = $subgraph->findParentNode($documentNode->nodeAggregateId); } if ($documentNode === null) { return; } $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeAddress = $nodeAddressFactory->createFromNode($node); @@ -434,7 +434,7 @@ public function afterNodePublishing(Node $node, Workspace $targetWorkspace) ]; $this->scheduledNodeEventUpdates[$documentNodeAddress->serializeForUri()] - ['nestedNodeIdentifiersWhichArePublished'][] = $node->nodeAggregateIdentifier; + ['nestedNodeIdentifiersWhichArePublished'][] = $node->nodeAggregateId; } /** diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DelegatingResolver.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DelegatingResolver.php index 248a7620a77..4ad756fbd30 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DelegatingResolver.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DelegatingResolver.php @@ -14,7 +14,7 @@ namespace Neos\Neos\FrontendRouting\DimensionResolution; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Annotations as Flow; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\Flow\Mvc\Routing\Dto\UriConstraints; @@ -62,7 +62,7 @@ public function fromRequestToDimensionSpacePoint( assert($factory instanceof DimensionResolverFactoryInterface); $resolverOptions = $siteConfiguration['contentDimensions']['resolver']['options'] ?? []; $context = $factory->create( - $siteDetectionResult->contentRepositoryIdentifier, + $siteDetectionResult->contentRepositoryId, $resolverOptions )->fromRequestToDimensionSpacePoint($context); @@ -102,7 +102,7 @@ public function fromDimensionSpacePointToUriConstraints( throw new \RuntimeException('Did not find site object for identifier ' . $targetSiteIdentifier->value); } $siteConfiguration = $targetSite->getConfiguration(); - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString( + $contentRepositoryIdentifier = ContentRepositoryId::fromString( $siteConfiguration['contentRepository'] ?? throw new \RuntimeException( 'There is no content repository identifier configured in Sites configuration' diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DimensionResolverFactoryInterface.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DimensionResolverFactoryInterface.php index 0cdc38e09bf..b71c1df5fdf 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DimensionResolverFactoryInterface.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/DimensionResolverFactoryInterface.php @@ -4,7 +4,7 @@ namespace Neos\Neos\FrontendRouting\DimensionResolution; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; /** * API Contract for creating a {@see DimensionResolverInterface} from Settings (usually @@ -18,12 +18,12 @@ interface DimensionResolverFactoryInterface { /** - * @param ContentRepositoryIdentifier $contentRepositoryIdentifier + * @param ContentRepositoryId $contentRepositoryIdentifier * @param array $dimensionResolverOptions * @return DimensionResolverInterface */ public function create( - ContentRepositoryIdentifier $contentRepositoryIdentifier, + ContentRepositoryId $contentRepositoryIdentifier, array $dimensionResolverOptions ): DimensionResolverInterface; } diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/AutoUriPathResolverFactory.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/AutoUriPathResolverFactory.php index 3167a3deddc..bdd3a6c0418 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/AutoUriPathResolverFactory.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/AutoUriPathResolverFactory.php @@ -15,7 +15,7 @@ namespace Neos\Neos\FrontendRouting\DimensionResolution\Resolver; use Neos\ContentRepository\Core\Dimension\ContentDimension; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Neos\FrontendRouting\DimensionResolution\DimensionResolverFactoryInterface; use Neos\Neos\FrontendRouting\DimensionResolution\DimensionResolverInterface; @@ -44,7 +44,7 @@ public function __construct( * @param array $dimensionResolverOptions */ public function create( - ContentRepositoryIdentifier $contentRepositoryIdentifier, + ContentRepositoryId $contentRepositoryIdentifier, array $dimensionResolverOptions ): DimensionResolverInterface { $autoUriPathResolverFactoryInternals = $this->contentRepositoryRegistry->getService( @@ -72,7 +72,7 @@ public function create( $segments = Segments::create( Segment::create( - $contentDimension->identifier, + $contentDimension->id, SegmentMapping::create(...$mapping) ) ); diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/NoopResolverFactory.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/NoopResolverFactory.php index 06d3be1486e..65eb2741d5c 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/NoopResolverFactory.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/NoopResolverFactory.php @@ -14,7 +14,7 @@ namespace Neos\Neos\FrontendRouting\DimensionResolution\Resolver; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Neos\FrontendRouting\DimensionResolution\DimensionResolverFactoryInterface; use Neos\Neos\FrontendRouting\DimensionResolution\DimensionResolverInterface; @@ -31,7 +31,7 @@ final class NoopResolverFactory implements DimensionResolverFactoryInterface * @param array $dimensionResolverOptions */ public function create( - ContentRepositoryIdentifier $contentRepositoryIdentifier, + ContentRepositoryId $contentRepositoryIdentifier, array $dimensionResolverOptions ): DimensionResolverInterface { return new NoopResolver(); diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver.php index cf46dc429c9..1ae39232734 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver.php @@ -83,7 +83,7 @@ private static function validate( if ($contentDimension->getValue($mappingElement->dimensionValue->value) === null) { throw new UriPathResolverConfigurationException( 'Content Dimension Value "' . $mappingElement->dimensionValue->value - . '" in dimension "' . $segment->dimensionIdentifier->identifier . '" does not exist.' + . '" in dimension "' . $segment->dimensionIdentifier->id . '" does not exist.' ); } @@ -149,7 +149,7 @@ private static function cartesian(Segments $segments): array foreach ($result as $product) { foreach ($segment->uriPathSegmentMapping as $item) { - $product[$segment->dimensionIdentifier->identifier] = $item; + $product[$segment->dimensionIdentifier->id] = $item; $append[] = $product; } } @@ -204,7 +204,7 @@ private function reduceDimensionSpacePointToConfiguredDimensions(DimensionSpaceP foreach ($this->segments->segments as $segment) { $coordinateValue = $incoming->getCoordinate($segment->dimensionIdentifier); if ($coordinateValue !== null) { - $newCoordinates[$segment->dimensionIdentifier->identifier] = $coordinateValue; + $newCoordinates[$segment->dimensionIdentifier->id] = $coordinateValue; } } return DimensionSpacePoint::fromArray($newCoordinates); diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segment.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segment.php index dc081a11ad0..39da89d3374 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segment.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segment.php @@ -5,7 +5,7 @@ namespace Neos\Neos\FrontendRouting\DimensionResolution\Resolver\UriPathResolver; use Neos\Flow\Annotations as Flow; -use Neos\ContentRepository\Core\Dimension\ContentDimensionIdentifier; +use Neos\ContentRepository\Core\Dimension\ContentDimensionId; /** * @Flow\Proxy(false) @@ -13,13 +13,13 @@ final class Segment { private function __construct( - public readonly ContentDimensionIdentifier $dimensionIdentifier, + public readonly ContentDimensionId $dimensionIdentifier, public readonly SegmentMapping $uriPathSegmentMapping, ) { } public static function create( - ContentDimensionIdentifier $dimensionIdentifier, + ContentDimensionId $dimensionIdentifier, SegmentMapping $uriPathSegmentMapping, ): self { return new self( diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segments.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segments.php index 3e5423447b8..0c6b567b2e4 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segments.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolver/Segments.php @@ -5,7 +5,7 @@ namespace Neos\Neos\FrontendRouting\DimensionResolution\Resolver\UriPathResolver; use Neos\Flow\Annotations as Flow; -use Neos\ContentRepository\Core\Dimension\ContentDimensionIdentifier; +use Neos\ContentRepository\Core\Dimension\ContentDimensionId; use Neos\Utility\PositionalArraySorter; /** @@ -39,7 +39,7 @@ public static function fromArray(array $arr): self $segments = array_map(function (array $segArr) { return Segment::create( - new ContentDimensionIdentifier($segArr['dimensionIdentifier']), + new ContentDimensionId($segArr['dimensionIdentifier']), SegmentMapping::fromArray($segArr['dimensionValueMapping'] ?? []), ); }, $arr); diff --git a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolverFactory.php b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolverFactory.php index 0ce615aeb4f..c53e57a56ea 100644 --- a/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolverFactory.php +++ b/Neos.Neos/Classes/FrontendRouting/DimensionResolution/Resolver/UriPathResolverFactory.php @@ -15,7 +15,7 @@ namespace Neos\Neos\FrontendRouting\DimensionResolution\Resolver; use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Neos\FrontendRouting\DimensionResolution\DimensionResolverFactoryInterface; use Neos\Neos\FrontendRouting\DimensionResolution\DimensionResolverInterface; @@ -38,7 +38,7 @@ public function __construct( * @param array $dimensionResolverOptions */ public function create( - ContentRepositoryIdentifier $contentRepositoryIdentifier, + ContentRepositoryId $contentRepositoryIdentifier, array $dimensionResolverOptions ): DimensionResolverInterface { $internals = $this->contentRepositoryRegistry->getService( diff --git a/Neos.Neos/Classes/FrontendRouting/EventSourcedFrontendNodeRoutePartHandler.php b/Neos.Neos/Classes/FrontendRouting/EventSourcedFrontendNodeRoutePartHandler.php index bfcea6a12c4..a36e054693f 100644 --- a/Neos.Neos/Classes/FrontendRouting/EventSourcedFrontendNodeRoutePartHandler.php +++ b/Neos.Neos/Classes/FrontendRouting/EventSourcedFrontendNodeRoutePartHandler.php @@ -62,7 +62,7 @@ * ┌──────────────┐ │ EventSourcedFrontendNodeRoutePartHandler │ * │SiteDetection │ │ ┌─────────────────────┐ │ * │Middleware (*)│────────────────────▶│ │DimensionResolver (*)│─────▶ Finding the ─┼─▶NodeAddress - * └──────────────┘ current site │ └─────────────────────┘ NodeIdentifier │ + * └──────────────┘ current site │ └─────────────────────┘ NodeId │ * └───────────────────────────────────────────────┘ * current Content current * Repository DimensionSpacePoint @@ -111,10 +111,10 @@ * The **result** of the {@see EventSourcedFrontendNodeRoutePartHandler::matchWithParameters} call is a * {@see NodeAddress} (wrapped in a {@see MatchResult}); so to build the NodeAddress, we need: * - the {@see WorkspaceName} (which is always **live** in our case) - * - the {@see ContentStreamIdentifier} of the Live workspace + * - the {@see ContentStreamId} of the Live workspace * - The {@see DimensionSpacePoint} we want to see the page in (i.e. in language=de) * - resolved by {@see DimensionResolverInterface} - * - The {@see NodeAggregateIdentifier} (of the Document Node we want to show) + * - The {@see NodeAggregateId} (of the Document Node we want to show) * - resolved by {@see EventSourcedFrontendNodeRoutePartHandler} * * @@ -197,7 +197,7 @@ public function matchWithParameters(&$requestPath, RouteParameters $parameters) // if incomplete -> no match + log $siteDetectionResult = SiteDetectionResult::fromRouteParameters($parameters); - $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryId); try { $matchResult = $this->matchUriPath( @@ -237,9 +237,9 @@ private function matchUriPath( $dimensionSpacePoint->hash ); $nodeAddress = new NodeAddress( - $documentUriPathFinder->getLiveContentStreamIdentifier(), + $documentUriPathFinder->getLiveContentStreamId(), $dimensionSpacePoint, - $nodeInfo->getNodeAggregateIdentifier(), + $nodeInfo->getNodeAggregateId(), WorkspaceName::forLive() ); return new MatchResult($nodeAddress->serializeForUri(), $nodeInfo->getRouteTags()); @@ -287,11 +287,11 @@ private function resolveNodeAddress( ): ResolveResult { // TODO: SOMEHOW FIND OTHER CONTENT REPOSITORY HERE FOR CROSS-CR LINKS!! $contentRepository = $this->contentRepositoryRegistry->get( - $currentRequestSiteDetectionResult->contentRepositoryIdentifier + $currentRequestSiteDetectionResult->contentRepositoryId ); $documentUriPathFinder = $contentRepository->projectionState(DocumentUriPathProjection::class); $nodeInfo = $documentUriPathFinder->getByIdAndDimensionSpacePointHash( - $nodeAddress->nodeAggregateIdentifier, + $nodeAddress->nodeAggregateId, $nodeAddress->dimensionSpacePoint->hash ); if ($nodeInfo->isDisabled()) { diff --git a/Neos.Neos/Classes/FrontendRouting/NodeAddress.php b/Neos.Neos/Classes/FrontendRouting/NodeAddress.php index d1097af14dc..26a6ab7dd54 100644 --- a/Neos.Neos/Classes/FrontendRouting/NodeAddress.php +++ b/Neos.Neos/Classes/FrontendRouting/NodeAddress.php @@ -14,9 +14,9 @@ namespace Neos\Neos\FrontendRouting; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -24,7 +24,7 @@ * * Describes the intention of the user making the current request: * Show me - * node $nodeAggregateIdentifier + * node $nodeAggregateId * in dimensions $dimensionSpacePoint * in contentStreamIdentifier $contentStreamIdentifier * @@ -38,19 +38,19 @@ final class NodeAddress * @internal use NodeAddressFactory, if you want to create a NodeAddress */ public function __construct( - public readonly ContentStreamIdentifier $contentStreamIdentifier, + public readonly ContentStreamId $contentStreamId, public readonly DimensionSpacePoint $dimensionSpacePoint, - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateId, public readonly WorkspaceName $workspaceName ) { } - public function withNodeAggregateIdentifier(NodeAggregateIdentifier $nodeAggregateIdentifier): self + public function withNodeAggregateId(NodeAggregateId $nodeAggregateId): self { return new self( - $this->contentStreamIdentifier, + $this->contentStreamId, $this->dimensionSpacePoint, - $nodeAggregateIdentifier, + $nodeAggregateId, $this->workspaceName ); } @@ -61,7 +61,7 @@ public function serializeForUri(): string // when changing the serialization here return $this->workspaceName->name . '__' . base64_encode(json_encode($this->dimensionSpacePoint->coordinates, JSON_THROW_ON_ERROR)) - . '__' . $this->nodeAggregateIdentifier->jsonSerialize(); + . '__' . $this->nodeAggregateId->jsonSerialize(); } public function isInLiveWorkspace(): bool @@ -73,9 +73,9 @@ public function __toString(): string { return sprintf( 'NodeAddress[contentStream=%s, dimensionSpacePoint=%s, nodeAggregateIdentifier=%s, workspaceName=%s]', - $this->contentStreamIdentifier, + $this->contentStreamId, $this->dimensionSpacePoint, - $this->nodeAggregateIdentifier, + $this->nodeAggregateId, $this->workspaceName ); } diff --git a/Neos.Neos/Classes/FrontendRouting/NodeAddressFactory.php b/Neos.Neos/Classes/FrontendRouting/NodeAddressFactory.php index b82bcae7c27..fc1816a2933 100644 --- a/Neos.Neos/Classes/FrontendRouting/NodeAddressFactory.php +++ b/Neos.Neos/Classes/FrontendRouting/NodeAddressFactory.php @@ -17,7 +17,7 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\Neos\FrontendRouting\NodeAddress; @@ -38,20 +38,20 @@ public static function create(ContentRepository $contentRepository): self public function createFromNode(Node $node): NodeAddress { - $workspace = $this->contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamIdentifier( - $node->subgraphIdentity->contentStreamIdentifier + $workspace = $this->contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId( + $node->subgraphIdentity->contentStreamId ); if ($workspace === null) { throw new \RuntimeException( - 'Cannot build a NodeAddress for traversable node of aggregate ' . $node->nodeAggregateIdentifier - . ', because the content stream ' . $node->subgraphIdentity->contentStreamIdentifier + 'Cannot build a NodeAddress for traversable node of aggregate ' . $node->nodeAggregateId + . ', because the content stream ' . $node->subgraphIdentity->contentStreamId . ' is not assigned to a workspace.' ); } return new NodeAddress( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $node->subgraphIdentity->dimensionSpacePoint, - $node->nodeAggregateIdentifier, + $node->nodeAggregateId, $workspace->workspaceName ); } @@ -65,10 +65,10 @@ public function createFromUriString(string $serializedNodeAddress): NodeAddress = explode('__', $serializedNodeAddress); $workspaceName = WorkspaceName::fromString($workspaceNameSerialized); $dimensionSpacePoint = DimensionSpacePoint::fromUriRepresentation($dimensionSpacePointSerialized); - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($nodeAggregateIdentifierSerialized); + $nodeAggregateIdentifier = NodeAggregateId::fromString($nodeAggregateIdentifierSerialized); $contentStreamIdentifier = $this->contentRepository->getWorkspaceFinder()->findOneByName($workspaceName) - ?->currentContentStreamIdentifier; + ?->currentContentStreamId; if (is_null($contentStreamIdentifier)) { throw new \InvalidArgumentException( 'Could not resolve content stream identifier for node address ' . $serializedNodeAddress, diff --git a/Neos.Neos/Classes/FrontendRouting/NodeShortcutResolver.php b/Neos.Neos/Classes/FrontendRouting/NodeShortcutResolver.php index 14cc05718c1..f5e6abf7bca 100644 --- a/Neos.Neos/Classes/FrontendRouting/NodeShortcutResolver.php +++ b/Neos.Neos/Classes/FrontendRouting/NodeShortcutResolver.php @@ -16,7 +16,7 @@ use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\Neos\FrontendRouting\Exception\InvalidShortcutException; use Neos\Neos\FrontendRouting\Exception\NodeNotFoundException; @@ -51,7 +51,7 @@ public function __construct( /** * "adapter" for {@see resolveNode} when working with NodeAddresses. - * Note: The ContentStreamIdentifier is not required for this service, + * Note: The ContentStreamId is not required for this service, * because it is only covering the live workspace * * @param NodeAddress $nodeAddress @@ -65,7 +65,7 @@ public function resolveShortcutTarget(NodeAddress $nodeAddress, ContentRepositor { $documentUriPathFinder = $contentRepository->projectionState(DocumentUriPathProjection::class); $documentNodeInfo = $documentUriPathFinder->getByIdAndDimensionSpacePointHash( - $nodeAddress->nodeAggregateIdentifier, + $nodeAddress->nodeAggregateId, $nodeAddress->dimensionSpacePoint->hash ); $resolvedTarget = $this->resolveNode($documentNodeInfo, $contentRepository); @@ -75,13 +75,13 @@ public function resolveShortcutTarget(NodeAddress $nodeAddress, ContentRepositor if ($resolvedTarget === $documentNodeInfo) { return $nodeAddress; } - return $nodeAddress->withNodeAggregateIdentifier($documentNodeInfo->getNodeAggregateIdentifier()); + return $nodeAddress->withNodeAggregateId($documentNodeInfo->getNodeAggregateId()); } /** * This method is used during routing (when creating URLs), to directly generate URLs to the shortcut TARGET, * if linking to a shortcut. - * Note: The ContentStreamIdentifier is not required for this service, + * Note: The ContentStreamId is not required for this service, * because it is only covering the live workspace * * @param DocumentNodeInfo $documentNodeInfo @@ -112,21 +112,21 @@ public function resolveNode( throw new InvalidShortcutException(sprintf( 'Shortcut Node "%s" points to a non-existing parent node "%s"', $documentNodeInfo, - $documentNodeInfo->getNodeAggregateIdentifier() + $documentNodeInfo->getNodeAggregateId() ), 1599669406, $e); } if ($documentNodeInfo->isDisabled()) { throw new InvalidShortcutException(sprintf( 'Shortcut Node "%s" points to disabled parent node "%s"', $documentNodeInfo, - $documentNodeInfo->getNodeAggregateIdentifier() + $documentNodeInfo->getNodeAggregateId() ), 1599664517); } continue 2; case 'firstChildNode': try { $documentNodeInfo = $documentUriPathFinder->getFirstEnabledChildNode( - $documentNodeInfo->getNodeAggregateIdentifier(), + $documentNodeInfo->getNodeAggregateId(), $documentNodeInfo->getDimensionSpacePointHash() ); } catch (\Exception $e) { @@ -148,10 +148,10 @@ public function resolveNode( ), 1599043489, $e); } if ($targetUri->getScheme() === 'node') { - $targetNodeAggregateIdentifier = NodeAggregateIdentifier::fromString($targetUri->getHost()); + $targetNodeAggregateId = NodeAggregateId::fromString($targetUri->getHost()); try { $documentNodeInfo = $documentUriPathFinder->getByIdAndDimensionSpacePointHash( - $targetNodeAggregateIdentifier, + $targetNodeAggregateId, $documentNodeInfo->getDimensionSpacePointHash() ); } catch (\Exception $e) { @@ -165,7 +165,7 @@ public function resolveNode( throw new InvalidShortcutException(sprintf( 'Shortcut target in Node "%s" points to disabled node "%s"', $documentNodeInfo, - $documentNodeInfo->getNodeAggregateIdentifier() + $documentNodeInfo->getNodeAggregateId() ), 1599664423); } continue 2; diff --git a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentNodeInfo.php b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentNodeInfo.php index 97fd5380ae8..15f727debeb 100644 --- a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentNodeInfo.php +++ b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentNodeInfo.php @@ -16,7 +16,7 @@ use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\Flow\Annotations as Flow; use Neos\Flow\Mvc\Routing\Dto\RouteTags; @@ -70,39 +70,39 @@ public function withOriginDimensionSpacePoint(OriginDimensionSpacePoint $originD return new self($source); } - public function getNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getNodeAggregateId(): NodeAggregateId { - return NodeAggregateIdentifier::fromString($this->source['nodeaggregateidentifier']); + return NodeAggregateId::fromString($this->source['nodeaggregateid']); } public function isRoot(): bool { - return $this->source['parentnodeaggregateidentifier'] === null; + return $this->source['parentnodeaggregateid'] === null; } - public function getParentNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getParentNodeAggregateId(): NodeAggregateId { - return NodeAggregateIdentifier::fromString($this->source['parentnodeaggregateidentifier']); + return NodeAggregateId::fromString($this->source['parentnodeaggregateid']); } - public function hasPrecedingNodeAggregateIdentifier(): bool + public function hasPrecedingNodeAggregateId(): bool { - return $this->source['precedingnodeaggregateidentifier'] !== null; + return $this->source['precedingnodeaggregateid'] !== null; } - public function getPrecedingNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getPrecedingNodeAggregateId(): NodeAggregateId { - return NodeAggregateIdentifier::fromString($this->source['precedingnodeaggregateidentifier']); + return NodeAggregateId::fromString($this->source['precedingnodeaggregateid']); } - public function hasSucceedingNodeAggregateIdentifier(): bool + public function hasSucceedingNodeAggregateId(): bool { - return $this->source['succeedingnodeaggregateidentifier'] !== null; + return $this->source['succeedingnodeaggregateid'] !== null; } - public function getSucceedingNodeAggregateIdentifier(): NodeAggregateIdentifier + public function getSucceedingNodeAggregateId(): NodeAggregateId { - return NodeAggregateIdentifier::fromString($this->source['succeedingnodeaggregateidentifier']); + return NodeAggregateId::fromString($this->source['succeedingnodeaggregateid']); } public function getDimensionSpacePointHash(): string @@ -111,13 +111,13 @@ public function getDimensionSpacePointHash(): string } /** - * This is NOT the node path; but the "nodeAggregateIdentifiers on the hierarchy; separated by /" + * This is NOT the node path; but the "nodeAggregateIds on the hierarchy; separated by /" * * @return string */ - public function getNodeAggregateIdentifierPath(): string + public function getNodeAggregateIdPath(): string { - return $this->source['nodeaggregateidentifierpath']; + return $this->source['nodeaggregateidpath']; } public function getUriPath(): string @@ -166,16 +166,16 @@ public function getShortcutTargetUri(): UriInterface /** - * As the route tags are based on the node aggregate identifiers of the node and its parents up to the site, - * we can extract this from the "nodeAggregateIdentifierPath", which contains these identifiers. + * As the route tags are based on the node aggregate ids of the node and its parents up to the site, + * we can extract this from the "nodeAggregateIdPath", which contains these ids. * * @return RouteTags */ public function getRouteTags(): RouteTags { - $nodeAggregateIdentifiers = explode('/', $this->getNodeAggregateIdentifierPath()); - array_shift($nodeAggregateIdentifiers); // remove the root node identifier from the list - return RouteTags::createFromArray($nodeAggregateIdentifiers); + $nodeAggregateIds = explode('/', $this->getNodeAggregateIdPath()); + array_shift($nodeAggregateIds); // remove the root node id from the list + return RouteTags::createFromArray($nodeAggregateIds); } public function getSiteNodeName(): SiteNodeName @@ -215,7 +215,7 @@ public function toArray(): array public function __toString(): string { - return ($this->source['nodeaggregateidentifier'] ?? '') + return ($this->source['nodeaggregateid'] ?? '') . '@' . ($this->source['dimensionspacepointhash'] ?? ''); } } diff --git a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php index e43317c45de..e9584bb1a39 100644 --- a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php +++ b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php @@ -8,8 +8,8 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; use Neos\ContentRepository\Core\Projection\ProjectionStateInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Neos\Domain\Model\SiteNodeName; use Neos\Neos\FrontendRouting\Exception\NodeNotFoundException; @@ -18,7 +18,7 @@ */ final class DocumentUriPathFinder implements ProjectionStateInterface { - private ?ContentStreamIdentifier $liveContentStreamIdentifierRuntimeCache = null; + private ?ContentStreamId $liveContentStreamIdRuntimeCache = null; public function __construct( private readonly Connection $dbal, @@ -51,24 +51,24 @@ public function getEnabledBySiteNodeNameUriPathAndDimensionSpacePointHash( } /** - * Returns the DocumentNodeInfo of a node for the given $nodeAggregateIdentifier + * Returns the DocumentNodeInfo of a node for the given $nodeAggregateId * Note: This will not exclude *disabled* nodes in order to allow the calling side * to make a distinction (e.g. in order to display a custom error) * - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateId * @param string $dimensionSpacePointHash * @return DocumentNodeInfo * @throws NodeNotFoundException if no matching DocumentNodeInfo can be found * (node doesn't exist in live workspace, projection not up to date) */ public function getByIdAndDimensionSpacePointHash( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, string $dimensionSpacePointHash ): DocumentNodeInfo { return $this->fetchSingle( - 'nodeAggregateIdentifier = :nodeAggregateIdentifier + 'nodeAggregateId = :nodeAggregateId AND dimensionSpacePointHash = :dimensionSpacePointHash', - compact('nodeAggregateIdentifier', 'dimensionSpacePointHash') + compact('nodeAggregateId', 'dimensionSpacePointHash') ); } @@ -85,99 +85,99 @@ public function getByIdAndDimensionSpacePointHash( public function getParentNode(DocumentNodeInfo $nodeInfo): DocumentNodeInfo { return $this->getByIdAndDimensionSpacePointHash( - $nodeInfo->getParentNodeAggregateIdentifier(), + $nodeInfo->getParentNodeAggregateId(), $nodeInfo->getDimensionSpacePointHash() ); } /** - * Returns the preceding DocumentNodeInfo for $succeedingNodeAggregateIdentifier - * and the $parentNodeAggregateIdentifier (= node on the same hierarchy level) + * Returns the preceding DocumentNodeInfo for $succeedingNodeAggregateId + * and the $parentNodeAggregateId (= node on the same hierarchy level) * Note: This will not exclude *disabled* nodes in order to allow the calling side * to make a distinction (e.g. in order to display a custom error) * - * @param NodeAggregateIdentifier $succeedingNodeAggregateIdentifier - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $succeedingNodeAggregateId + * @param NodeAggregateId $parentNodeAggregateId * @param string $dimensionSpacePointHash * @return DocumentNodeInfo * @throws NodeNotFoundException if no preceding DocumentNodeInfo can be found - * (given $succeedingNodeAggregateIdentifier doesn't exist or refers to the first/only node - * with the given $parentNodeAggregateIdentifier) + * (given $succeedingNodeAggregateId doesn't exist or refers to the first/only node + * with the given $parentNodeAggregateId) */ public function getPrecedingNode( - NodeAggregateIdentifier $succeedingNodeAggregateIdentifier, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $succeedingNodeAggregateId, + NodeAggregateId $parentNodeAggregateId, string $dimensionSpacePointHash ): DocumentNodeInfo { return $this->fetchSingle( 'dimensionSpacePointHash = :dimensionSpacePointHash - AND parentNodeAggregateIdentifier = :parentNodeAggregateIdentifier - AND succeedingNodeAggregateIdentifier = :succeedingNodeAggregateIdentifier', + AND parentNodeAggregateId = :parentNodeAggregateId + AND succeedingNodeAggregateId = :succeedingNodeAggregateId', compact( 'dimensionSpacePointHash', - 'parentNodeAggregateIdentifier', - 'succeedingNodeAggregateIdentifier' + 'parentNodeAggregateId', + 'succeedingNodeAggregateId' ) ); } /** - * Returns the DocumentNodeInfo for the first *enabled* child node for the specified $parentNodeAggregateIdentifier + * Returns the DocumentNodeInfo for the first *enabled* child node for the specified $parentNodeAggregateId * Note: This will not exclude *disabled* nodes in order to allow the calling side to make a distinction * (e.g. in order to display a custom error) * - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param string $dimensionSpacePointHash * @return DocumentNodeInfo * @throws NodeNotFoundException */ public function getFirstEnabledChildNode( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, string $dimensionSpacePointHash ): DocumentNodeInfo { return $this->fetchSingle( 'dimensionSpacePointHash = :dimensionSpacePointHash - AND parentNodeAggregateIdentifier = :parentNodeAggregateIdentifier - AND precedingNodeAggregateIdentifier IS NULL + AND parentNodeAggregateId = :parentNodeAggregateId + AND precedingNodeAggregateId IS NULL AND disabled = 0', - compact('dimensionSpacePointHash', 'parentNodeAggregateIdentifier') + compact('dimensionSpacePointHash', 'parentNodeAggregateId') ); } /** - * @param NodeAggregateIdentifier $parentNodeAggregateIdentifier + * @param NodeAggregateId $parentNodeAggregateId * @param string $dimensionSpacePointHash * @return DocumentNodeInfo * @throws NodeNotFoundException */ public function getLastChildNode( - NodeAggregateIdentifier $parentNodeAggregateIdentifier, + NodeAggregateId $parentNodeAggregateId, string $dimensionSpacePointHash ): DocumentNodeInfo { return $this->fetchSingle( 'dimensionSpacePointHash = :dimensionSpacePointHash - AND parentNodeAggregateIdentifier = :parentNodeAggregateIdentifier - AND succeedingNodeAggregateIdentifier IS NULL', - compact('dimensionSpacePointHash', 'parentNodeAggregateIdentifier') + AND parentNodeAggregateId = :parentNodeAggregateId + AND succeedingNodeAggregateId IS NULL', + compact('dimensionSpacePointHash', 'parentNodeAggregateId') ); } /** - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param NodeAggregateId $nodeAggregateId * @return \Iterator|DocumentNodeInfo[] */ - public function getNodeVariantsById(NodeAggregateIdentifier $nodeAggregateIdentifier): \Iterator + public function getNodeVariantsById(NodeAggregateId $nodeAggregateId): \Iterator { try { $iterator = $this->dbal->executeQuery( 'SELECT * FROM ' . $this->tableNamePrefix . '_uri - WHERE nodeAggregateIdentifier = :nodeAggregateIdentifier', - ['nodeAggregateIdentifier' => $nodeAggregateIdentifier] + WHERE nodeAggregateId = :nodeAggregateId', + ['nodeAggregateId' => $nodeAggregateId] ); } catch (DBALException $e) { throw new \RuntimeException(sprintf( 'Failed to get node variants for id "%s": %s', - $nodeAggregateIdentifier, + $nodeAggregateId, $e->getMessage() ), 1599665543, $e); } @@ -186,31 +186,31 @@ public function getNodeVariantsById(NodeAggregateIdentifier $nodeAggregateIdenti } } - public function getLiveContentStreamIdentifier(): ContentStreamIdentifier + public function getLiveContentStreamId(): ContentStreamId { - if ($this->liveContentStreamIdentifierRuntimeCache === null) { + if ($this->liveContentStreamIdRuntimeCache === null) { try { - $contentStreamIdentifier = $this->dbal->fetchColumn( - 'SELECT contentStreamIdentifier FROM ' + $contentStreamId = $this->dbal->fetchColumn( + 'SELECT contentStreamId FROM ' . $this->tableNamePrefix . '_livecontentstreams LIMIT 1' ); } catch (DBALException $e) { throw new \RuntimeException(sprintf( - 'Failed to fetch contentStreamIdentifier for live workspace: %s', + 'Failed to fetch contentStreamId for live workspace: %s', $e->getMessage() ), 1599666764, $e); } - if (!is_string($contentStreamIdentifier)) { + if (!is_string($contentStreamId)) { throw new \RuntimeException( - 'Failed to fetch contentStreamIdentifier for live workspace,' + 'Failed to fetch contentStreamId for live workspace,' . ' probably you have to replay the "documenturipath" projection', 1599667894 ); } - $this->liveContentStreamIdentifierRuntimeCache - = ContentStreamIdentifier::fromString($contentStreamIdentifier); + $this->liveContentStreamIdRuntimeCache + = ContentStreamId::fromString($contentStreamId); } - return $this->liveContentStreamIdentifierRuntimeCache; + return $this->liveContentStreamIdRuntimeCache; } /** diff --git a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php index ce41bc42a40..4b1b493d065 100644 --- a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php +++ b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php @@ -15,8 +15,8 @@ use Neos\ContentRepository\Core\EventStore\EventNormalizer; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeMoveMapping; use Neos\ContentRepository\Core\Projection\ProjectionInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event\DimensionShineThroughWasAdded; @@ -196,12 +196,12 @@ private function whenRootWorkspaceWasCreated(RootWorkspaceWasCreated $event): vo { try { $this->dbal->insert($this->tableNamePrefix . '_livecontentstreams', [ - 'contentStreamIdentifier' => $event->newContentStreamIdentifier, + 'contentStreamId' => $event->newContentStreamId, 'workspaceName' => $event->workspaceName, ]); } catch (DBALException $e) { throw new \RuntimeException(sprintf( - 'Failed to insert root content stream identifier of the root workspace "%s": %s', + 'Failed to insert root content stream id of the root workspace "%s": %s', $event->workspaceName, $e->getMessage() ), 1599646608, $e); @@ -210,22 +210,22 @@ private function whenRootWorkspaceWasCreated(RootWorkspaceWasCreated $event): vo private function whenRootNodeAggregateWithNodeWasCreated(RootNodeAggregateWithNodeWasCreated $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } foreach ($event->coveredDimensionSpacePoints as $dimensionSpacePoint) { $this->insertNode([ 'uriPath' => '', - 'nodeAggregateIdentifierPath' => $event->nodeAggregateIdentifier, + 'nodeAggregateIdPath' => $event->nodeAggregateId, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, - 'nodeAggregateIdentifier' => $event->nodeAggregateIdentifier, + 'nodeAggregateId' => $event->nodeAggregateId, ]); } } private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCreated $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } if (!$this->isDocumentNodeType($event->nodeTypeName)) { @@ -245,7 +245,7 @@ private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCre foreach ($event->coveredDimensionSpacePoints as $dimensionSpacePoint) { $parentNode = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $event->parentNodeAggregateIdentifier, + $event->parentNodeAggregateId, $dimensionSpacePoint->hash )); if ($parentNode === null) { @@ -255,40 +255,40 @@ private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCre /** @var DocumentNodeInfo|null $precedingNode */ $precedingNode = null; - if ($event->succeedingNodeAggregateIdentifier === null) { + if ($event->succeedingNodeAggregateId === null) { $precedingNode = $this->tryGetNode(fn () => $this->getState()->getLastChildNode( - $parentNode->getNodeAggregateIdentifier(), + $parentNode->getNodeAggregateId(), $dimensionSpacePoint->hash )); if ($precedingNode !== null) { // make the new node the new succeeding node of the previously last child // (= insert at the end of all children) $this->updateNode($precedingNode, [ - 'succeedingNodeAggregateIdentifier' => $event->nodeAggregateIdentifier + 'succeedingNodeAggregateId' => $event->nodeAggregateId ]); } } else { $precedingNode = $this->tryGetNode(fn () => $this->getState()->getPrecedingNode( - $event->succeedingNodeAggregateIdentifier, - $parentNode->getNodeAggregateIdentifier(), + $event->succeedingNodeAggregateId, + $parentNode->getNodeAggregateId(), $dimensionSpacePoint->hash )); if ($precedingNode !== null) { // make the new node the new succeeding node of the previously preceding node // of the specified succeeding node (= re-wire - to -) $this->updateNode($precedingNode, [ - 'succeedingNodeAggregateIdentifier' => $event->nodeAggregateIdentifier + 'succeedingNodeAggregateId' => $event->nodeAggregateId ]); } $this->updateNodeByIdAndDimensionSpacePointHash( - $event->succeedingNodeAggregateIdentifier, + $event->succeedingNodeAggregateId, $dimensionSpacePoint->hash, - ['precedingNodeAggregateIdentifier' => $event->nodeAggregateIdentifier] + ['precedingNodeAggregateId' => $event->nodeAggregateId] ); } - $nodeAggregateIdentifierPath = $parentNode->getNodeAggregateIdentifierPath() - . '/' . $event->nodeAggregateIdentifier; + $nodeAggregateIdPath = $parentNode->getNodeAggregateIdPath() + . '/' . $event->nodeAggregateId; if ($parentNode->isRoot() && $event->nodeName !== null) { $uriPath = ''; $siteNodeName = SiteNodeName::fromNodeName($event->nodeName); @@ -299,15 +299,15 @@ private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCre $siteNodeName = $parentNode->getSiteNodeName(); } $this->insertNode([ - 'nodeAggregateIdentifier' => $event->nodeAggregateIdentifier, + 'nodeAggregateId' => $event->nodeAggregateId, 'uriPath' => $uriPath, - 'nodeAggregateIdentifierPath' => $nodeAggregateIdentifierPath, + 'nodeAggregateIdPath' => $nodeAggregateIdPath, 'siteNodeName' => $siteNodeName, 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, 'originDimensionSpacePointHash' => $event->originDimensionSpacePoint->hash, - 'parentNodeAggregateIdentifier' => $parentNode->getNodeAggregateIdentifier(), - 'precedingNodeAggregateIdentifier' => $precedingNode?->getNodeAggregateIdentifier(), - 'succeedingNodeAggregateIdentifier' => $event->succeedingNodeAggregateIdentifier, + 'parentNodeAggregateId' => $parentNode->getNodeAggregateId(), + 'precedingNodeAggregateId' => $precedingNode?->getNodeAggregateId(), + 'succeedingNodeAggregateId' => $event->succeedingNodeAggregateId, 'shortcutTarget' => $shortcutTarget, ]); } @@ -315,33 +315,33 @@ private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCre private function whenNodeAggregateTypeWasChanged(NodeAggregateTypeWasChanged $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } if ($this->isShortcutNodeType($event->newNodeTypeName)) { // The node has been turned into a shortcut node, but since the shortcut mode is not yet set // we'll set it to "firstChildNode" in order to prevent an invalid mode $this->updateNodeQuery('SET shortcuttarget = \'{"mode":"firstChildNode","target":null}\' - WHERE nodeAggregateIdentifier = :nodeAggregateIdentifier + WHERE nodeAggregateId = :nodeAggregateId AND shortcuttarget IS NULL', [ - 'nodeAggregateIdentifier' => $event->nodeAggregateIdentifier, + 'nodeAggregateId' => $event->nodeAggregateId, ]); } elseif ($this->isDocumentNodeType($event->newNodeTypeName)) { $this->updateNodeQuery('SET shortcuttarget = NULL - WHERE nodeAggregateIdentifier = :nodeAggregateIdentifier + WHERE nodeAggregateId = :nodeAggregateId AND shortcuttarget IS NOT NULL', [ - 'nodeAggregateIdentifier' => $event->nodeAggregateIdentifier, + 'nodeAggregateId' => $event->nodeAggregateId, ]); } } private function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } $this->copyVariants( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $event->sourceOrigin, $event->peerOrigin, $event->peerCoverage @@ -350,11 +350,11 @@ private function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event) private function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVariantWasCreated $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } $this->copyVariants( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $event->sourceOrigin, $event->generalizationOrigin, $event->generalizationCoverage @@ -363,11 +363,11 @@ private function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVaria private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVariantWasCreated $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } $this->copyVariants( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $event->sourceOrigin, $event->specializationOrigin, $event->specializationCoverage @@ -375,13 +375,13 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria } private function copyVariants( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, DimensionSpacePointSet $coveredSpacePoints ): void { $sourceNode = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $nodeAggregateIdentifier, + $nodeAggregateId, $sourceOrigin->hash )); if ($sourceNode === null) { @@ -391,7 +391,7 @@ private function copyVariants( foreach ($coveredSpacePoints as $coveredSpacePoint) { // Especially when importing a site it can happen that variants are created in a "non-deterministic" order, // so we need to first make sure a target variant doesn't exist: - $this->deleteNodeByIdAndDimensionSpacePointHash($nodeAggregateIdentifier, $coveredSpacePoint->hash); + $this->deleteNodeByIdAndDimensionSpacePointHash($nodeAggregateId, $coveredSpacePoint->hash); $this->insertNode( $sourceNode @@ -404,12 +404,12 @@ private function copyVariants( private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } foreach ($event->affectedDimensionSpacePoints as $dimensionSpacePoint) { $node = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $dimensionSpacePoint->hash )); if ($node === null) { @@ -423,24 +423,24 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): $this->updateNodeQuery('SET disabled = disabled + 1 WHERE dimensionSpacePointHash = :dimensionSpacePointHash AND ( - nodeAggregateIdentifier = :nodeAggregateIdentifier - OR nodeAggregateIdentifierPath LIKE :childNodeAggregateIdentifierPathPrefix + nodeAggregateId = :nodeAggregateId + OR nodeAggregateIdPath LIKE :childNodeAggregateIdPathPrefix )', [ 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, - 'nodeAggregateIdentifier' => $event->nodeAggregateIdentifier, - 'childNodeAggregateIdentifierPathPrefix' => $node->getNodeAggregateIdentifierPath() . '/%', + 'nodeAggregateId' => $event->nodeAggregateId, + 'childNodeAggregateIdPathPrefix' => $node->getNodeAggregateIdPath() . '/%', ]); } } private function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } foreach ($event->affectedDimensionSpacePoints as $dimensionSpacePoint) { $node = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $dimensionSpacePoint->hash )); if ($node === null) { @@ -454,24 +454,24 @@ private function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): vo $this->updateNodeQuery('SET disabled = disabled - 1 WHERE dimensionSpacePointHash = :dimensionSpacePointHash AND ( - nodeAggregateIdentifier = :nodeAggregateIdentifier - OR nodeAggregateIdentifierPath LIKE :childNodeAggregateIdentifierPathPrefix + nodeAggregateId = :nodeAggregateId + OR nodeAggregateIdPath LIKE :childNodeAggregateIdPathPrefix )', [ 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, - 'nodeAggregateIdentifier' => $node->getNodeAggregateIdentifier(), - 'childNodeAggregateIdentifierPathPrefix' => $node->getNodeAggregateIdentifierPath() . '/%', + 'nodeAggregateId' => $node->getNodeAggregateId(), + 'childNodeAggregateIdPathPrefix' => $node->getNodeAggregateIdPath() . '/%', ]); } } private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } foreach ($event->affectedCoveredDimensionSpacePoints as $dimensionSpacePoint) { $node = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $dimensionSpacePoint->hash )); if ($node === null) { @@ -483,19 +483,19 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo $this->deleteNodeQuery('WHERE dimensionSpacePointHash = :dimensionSpacePointHash AND ( - nodeAggregateIdentifier = :nodeAggregateIdentifier - OR nodeAggregateIdentifierPath LIKE :childNodeAggregateIdentifierPathPrefix + nodeAggregateId = :nodeAggregateId + OR nodeAggregateIdPath LIKE :childNodeAggregateIdPathPrefix )', [ 'dimensionSpacePointHash' => $dimensionSpacePoint->hash, - 'nodeAggregateIdentifier' => $node->getNodeAggregateIdentifier(), - 'childNodeAggregateIdentifierPathPrefix' => $node->getNodeAggregateIdentifierPath() . '/%', + 'nodeAggregateId' => $node->getNodeAggregateId(), + 'childNodeAggregateIdPathPrefix' => $node->getNodeAggregateIdPath() . '/%', ]); } } private function whenNodePropertiesWereSet(NodePropertiesWereSet $event, EventEnvelope $eventEnvelope): void { - if (!$this->isLiveContentStream($event->contentStreamIdentifier)) { + if (!$this->isLiveContentStream($event->contentStreamId)) { return; } $newPropertyValues = $event->propertyValues->getPlainValues(); @@ -511,7 +511,7 @@ private function whenNodePropertiesWereSet(NodePropertiesWereSet $event, EventEn // see https://github.com/neos/contentrepository-development-collection/issues/163 $node = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $event->originDimensionSpacePoint->hash )); @@ -526,7 +526,7 @@ private function whenNodePropertiesWereSet(NodePropertiesWereSet $event, EventEn 'target' => $newPropertyValues['target'] ?? $shortcutTarget['target'], ]; $this->updateNodeByIdAndDimensionSpacePointHash( - $event->nodeAggregateIdentifier, + $event->nodeAggregateId, $event->originDimensionSpacePoint->hash, ['shortcutTarget' => $shortcutTarget] ); @@ -549,15 +549,15 @@ private function whenNodePropertiesWereSet(NodePropertiesWereSet $event, EventEn 'SET uriPath = CONCAT(:newUriPath, SUBSTRING(uriPath, LENGTH(:oldUriPath) + 1)) WHERE dimensionSpacePointHash = :dimensionSpacePointHash AND ( - nodeAggregateIdentifier = :nodeAggregateIdentifier - OR nodeAggregateIdentifierPath LIKE :childNodeAggregateIdentifierPathPrefix + nodeAggregateId = :nodeAggregateId + OR nodeAggregateIdPath LIKE :childNodeAggregateIdPathPrefix )', [ 'newUriPath' => $newUriPath, 'oldUriPath' => $oldUriPath, 'dimensionSpacePointHash' => $event->originDimensionSpacePoint->hash, - 'nodeAggregateIdentifier' => $node->getNodeAggregateIdentifier(), - 'childNodeAggregateIdentifierPathPrefix' => $node->getNodeAggregateIdentifierPath() . '/%', + 'nodeAggregateId' => $node->getNodeAggregateId(), + 'childNodeAggregateIdPathPrefix' => $node->getNodeAggregateIdPath() . '/%', ] ); $this->emitDocumentUriPathChanged($oldUriPath, $newUriPath, $event, $eventEnvelope); @@ -565,7 +565,7 @@ private function whenNodePropertiesWereSet(NodePropertiesWereSet $event, EventEn private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void { - if (!$this->isLiveContentStream($event->getContentStreamIdentifier())) { + if (!$this->isLiveContentStream($event->getContentStreamId())) { return; } if (!is_null($event->nodeMoveMappings)) { @@ -573,20 +573,20 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void /* @var \Neos\ContentRepository\Core\Feature\NodeMove\Dto\NodeMoveMapping $moveMapping */ foreach ( $this->getState()->getNodeVariantsById( - $event->getNodeAggregateIdentifier() + $event->getNodeAggregateId() ) as $node ) { $parentAssignment = $moveMapping->newParentAssignments ->getAssignments()[$node->getDimensionSpacePointHash()] ?? null; - $newParentNodeAggregateIdentifier = $parentAssignment !== null - ? $parentAssignment->nodeAggregateIdentifier - : $node->getParentNodeAggregateIdentifier(); + $newParentNodeAggregateId = $parentAssignment !== null + ? $parentAssignment->nodeAggregateId + : $node->getParentNodeAggregateId(); $succeedingSiblingAssignment = $moveMapping->newSucceedingSiblingAssignments ->getAssignments()[$node->getDimensionSpacePointHash()] ?? null; - $newSucceedingNodeAggregateIdentifier = $succeedingSiblingAssignment?->nodeAggregateIdentifier; + $newSucceedingNodeAggregateId = $succeedingSiblingAssignment?->nodeAggregateId; - $this->moveNode($node, $newParentNodeAggregateIdentifier, $newSucceedingNodeAggregateIdentifier); + $this->moveNode($node, $newParentNodeAggregateId, $newSucceedingNodeAggregateId); } } } else { @@ -596,18 +596,18 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void private function moveNode( DocumentNodeInfo $node, - NodeAggregateIdentifier $newParentNodeAggregateIdentifier, - ?NodeAggregateIdentifier $newSucceedingNodeAggregateIdentifier + NodeAggregateId $newParentNodeAggregateId, + ?NodeAggregateId $newSucceedingNodeAggregateId ): void { $this->disconnectNodeFromSiblings($node); - $this->connectNodeWithSiblings($node, $newParentNodeAggregateIdentifier, $newSucceedingNodeAggregateIdentifier); + $this->connectNodeWithSiblings($node, $newParentNodeAggregateId, $newSucceedingNodeAggregateId); - if ($newParentNodeAggregateIdentifier->equals($node->getParentNodeAggregateIdentifier())) { + if ($newParentNodeAggregateId->equals($node->getParentNodeAggregateId())) { return; } $newParentNode = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $newParentNodeAggregateIdentifier, + $newParentNodeAggregateId, $node->getDimensionSpacePointHash() )); if ($newParentNode === null) { @@ -622,24 +622,24 @@ private function moveNode( $this->updateNodeQuery( /** @codingStandardsIgnoreStart */ 'SET - nodeAggregateIdentifierPath = TRIM(TRAILING "/" FROM CONCAT(:newParentNodeAggregateIdentifierPath, "/", TRIM(LEADING "/" FROM SUBSTRING(nodeAggregateIdentifierPath, :sourceNodeAggregateIdentifierPathOffset)))), + nodeAggregateIdPath = TRIM(TRAILING "/" FROM CONCAT(:newParentNodeAggregateIdPath, "/", TRIM(LEADING "/" FROM SUBSTRING(nodeAggregateIdPath, :sourceNodeAggregateIdPathOffset)))), uriPath = TRIM("/" FROM CONCAT(:newParentUriPath, "/", TRIM(LEADING "/" FROM SUBSTRING(uriPath, :sourceUriPathOffset)))), disabled = disabled + ' . $disabledDelta . ' WHERE dimensionSpacePointHash = :dimensionSpacePointHash - AND (nodeAggregateIdentifier = :nodeAggregateIdentifier - OR nodeAggregateIdentifierPath LIKE :childNodeAggregateIdentifierPathPrefix) + AND (nodeAggregateId = :nodeAggregateId + OR nodeAggregateIdPath LIKE :childNodeAggregateIdPathPrefix) ', /** @codingStandardsIgnoreEnd */ [ - 'nodeAggregateIdentifier' => $node->getNodeAggregateIdentifier(), - 'newParentNodeAggregateIdentifierPath' => $newParentNode->getNodeAggregateIdentifierPath(), - 'sourceNodeAggregateIdentifierPathOffset' - => (int)strrpos($node->getNodeAggregateIdentifierPath(), '/') + 1, + 'nodeAggregateId' => $node->getNodeAggregateId(), + 'newParentNodeAggregateIdPath' => $newParentNode->getNodeAggregateIdPath(), + 'sourceNodeAggregateIdPathOffset' + => (int)strrpos($node->getNodeAggregateIdPath(), '/') + 1, 'newParentUriPath' => $newParentNode->getUriPath(), 'sourceUriPathOffset' => (int)strrpos($node->getUriPath(), '/') + 1, 'dimensionSpacePointHash' => $node->getDimensionSpacePointHash(), - 'childNodeAggregateIdentifierPathPrefix' => $node->getNodeAggregateIdentifierPath() . '/%', + 'childNodeAggregateIdPathPrefix' => $node->getNodeAggregateIdPath() . '/%', ] ); } @@ -650,7 +650,7 @@ private function isNodeExplicitlyDisabled(DocumentNodeInfo $node): bool return false; } $parentNode = $this->tryGetNode(fn () => $this->getState()->getByIdAndDimensionSpacePointHash( - $node->getParentNodeAggregateIdentifier(), + $node->getParentNodeAggregateId(), $node->getDimensionSpacePointHash() )); $parentDisabledLevel = $parentNode !== null ? $parentNode->getDisableLevel() : 0; @@ -673,9 +673,9 @@ private function isShortcutNodeType(NodeTypeName $nodeTypeName): bool return $nodeType->isOfType('Neos.Neos:Shortcut'); } - private function isLiveContentStream(ContentStreamIdentifier $contentStreamIdentifier): bool + private function isLiveContentStream(ContentStreamId $contentStreamId): bool { - return $contentStreamIdentifier->equals($this->getState()->getLiveContentStreamIdentifier()); + return $contentStreamId->equals($this->getState()->getLiveContentStreamId()); } private function tryGetNode(\Closure $closure): ?DocumentNodeInfo @@ -706,7 +706,7 @@ private function insertNode(array $data): void private function updateNode(DocumentNodeInfo $node, array $data): void { $this->updateNodeByIdAndDimensionSpacePointHash( - $node->getNodeAggregateIdentifier(), + $node->getNodeAggregateId(), $node->getDimensionSpacePointHash(), $data ); @@ -716,7 +716,7 @@ private function updateNode(DocumentNodeInfo $node, array $data): void * @param array $data */ private function updateNodeByIdAndDimensionSpacePointHash( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, string $dimensionSpacePointHash, array $data ): void { @@ -724,13 +724,13 @@ private function updateNodeByIdAndDimensionSpacePointHash( $this->dbal->update( $this->tableNamePrefix . '_uri', $data, - compact('nodeAggregateIdentifier', 'dimensionSpacePointHash'), + compact('nodeAggregateId', 'dimensionSpacePointHash'), self::COLUMN_TYPES_DOCUMENT_URIS ); } catch (DBALException $e) { throw new \RuntimeException(sprintf( 'Failed to update node "%s": %s', - $nodeAggregateIdentifier, + $nodeAggregateId, $e->getMessage() ), 1599646777, $e); } @@ -756,19 +756,19 @@ private function updateNodeQuery(string $query, array $parameters): void } private function deleteNodeByIdAndDimensionSpacePointHash( - NodeAggregateIdentifier $nodeAggregateIdentifier, + NodeAggregateId $nodeAggregateId, string $dimensionSpacePointHash ): void { try { $this->dbal->delete( $this->tableNamePrefix . '_uri', - compact('nodeAggregateIdentifier', 'dimensionSpacePointHash'), + compact('nodeAggregateId', 'dimensionSpacePointHash'), self::COLUMN_TYPES_DOCUMENT_URIS ); } catch (DBALException $e) { throw new \RuntimeException(sprintf( 'Failed to delete node "%s": %s', - $nodeAggregateIdentifier, + $nodeAggregateId, $e->getMessage() ), 1599655284, $e); } @@ -795,21 +795,21 @@ private function deleteNodeQuery(string $query, array $parameters): void private function disconnectNodeFromSiblings(DocumentNodeInfo $node): void { - if ($node->hasPrecedingNodeAggregateIdentifier()) { + if ($node->hasPrecedingNodeAggregateId()) { $this->updateNodeByIdAndDimensionSpacePointHash( - $node->getPrecedingNodeAggregateIdentifier(), + $node->getPrecedingNodeAggregateId(), $node->getDimensionSpacePointHash(), - ['succeedingNodeAggregateIdentifier' => - $node->hasSucceedingNodeAggregateIdentifier() ? $node->getSucceedingNodeAggregateIdentifier() : null + ['succeedingNodeAggregateId' => + $node->hasSucceedingNodeAggregateId() ? $node->getSucceedingNodeAggregateId() : null ] ); } - if ($node->hasSucceedingNodeAggregateIdentifier()) { + if ($node->hasSucceedingNodeAggregateId()) { $this->updateNodeByIdAndDimensionSpacePointHash( - $node->getSucceedingNodeAggregateIdentifier(), + $node->getSucceedingNodeAggregateId(), $node->getDimensionSpacePointHash(), - ['precedingNodeAggregateIdentifier' => - $node->hasPrecedingNodeAggregateIdentifier() ? $node->getPrecedingNodeAggregateIdentifier() : null + ['precedingNodeAggregateId' => + $node->hasPrecedingNodeAggregateId() ? $node->getPrecedingNodeAggregateId() : null ] ); } @@ -817,47 +817,47 @@ private function disconnectNodeFromSiblings(DocumentNodeInfo $node): void private function connectNodeWithSiblings( DocumentNodeInfo $node, - NodeAggregateIdentifier $parentNodeAggregateIdentifier, - ?NodeAggregateIdentifier $newSucceedingNodeAggregateIdentifier + NodeAggregateId $parentNodeAggregateId, + ?NodeAggregateId $newSucceedingNodeAggregateId ): void { - if ($newSucceedingNodeAggregateIdentifier !== null) { + if ($newSucceedingNodeAggregateId !== null) { $newPrecedingNode = $this->tryGetNode(fn () => $this->getState()->getPrecedingNode( - $newSucceedingNodeAggregateIdentifier, - $parentNodeAggregateIdentifier, + $newSucceedingNodeAggregateId, + $parentNodeAggregateId, $node->getDimensionSpacePointHash() )); // update new succeeding node $this->updateNodeByIdAndDimensionSpacePointHash( - $newSucceedingNodeAggregateIdentifier, + $newSucceedingNodeAggregateId, $node->getDimensionSpacePointHash(), - ['precedingNodeAggregateIdentifier' => $node->getNodeAggregateIdentifier()] + ['precedingNodeAggregateId' => $node->getNodeAggregateId()] ); } else { $newPrecedingNode = $this->tryGetNode(fn () => $this->getState()->getLastChildNode( - $parentNodeAggregateIdentifier, + $parentNodeAggregateId, $node->getDimensionSpacePointHash() )); } if ($newPrecedingNode !== null) { $this->updateNode( $newPrecedingNode, - ['succeedingNodeAggregateIdentifier' => $node->getNodeAggregateIdentifier()] + ['succeedingNodeAggregateId' => $node->getNodeAggregateId()] ); } // update node itself $this->updateNode($node, [ - 'parentNodeAggregateIdentifier' => $parentNodeAggregateIdentifier, - 'precedingNodeAggregateIdentifier' => $newPrecedingNode?->getNodeAggregateIdentifier(), - 'succeedingNodeAggregateIdentifier' => $newSucceedingNodeAggregateIdentifier, + 'parentNodeAggregateId' => $parentNodeAggregateId, + 'precedingNodeAggregateId' => $newPrecedingNode?->getNodeAggregateId(), + 'succeedingNodeAggregateId' => $newSucceedingNodeAggregateId, ]); } private function whenDimensionSpacePointWasMoved(DimensionSpacePointWasMoved $event): void { - if ($this->isLiveContentStream($event->contentStreamIdentifier)) { + if ($this->isLiveContentStream($event->contentStreamId)) { $this->updateNodeQuery( 'SET dimensionspacepointhash = :newDimensionSpacePointHash WHERE dimensionspacepointhash = :originalDimensionSpacePointHash', @@ -881,32 +881,32 @@ private function whenDimensionSpacePointWasMoved(DimensionSpacePointWasMoved $ev private function whenDimensionShineThroughWasAdded(DimensionShineThroughWasAdded $event): void { - if ($this->isLiveContentStream($event->contentStreamIdentifier)) { + if ($this->isLiveContentStream($event->contentStreamId)) { try { $this->dbal->executeStatement('INSERT INTO ' . $this->tableNamePrefix . '_uri ( - nodeaggregateidentifier, + nodeaggregateid, uripath, - nodeaggregateidentifierpath, + nodeaggregateidpath, sitenodename, disabled, dimensionspacepointhash, origindimensionspacepointhash, - parentnodeaggregateidentifier, - precedingnodeaggregateidentifier, - succeedingnodeaggregateidentifier, + parentnodeaggregateid, + precedingnodeaggregateid, + succeedingnodeaggregateid, shortcuttarget ) SELECT - nodeaggregateidentifier, + nodeaggregateid, uripath, - nodeaggregateidentifierpath, + nodeaggregateidpath, sitenodename, disabled, :newDimensionSpacePointHash AS dimensionspacepointhash, origindimensionspacepointhash, - parentnodeaggregateidentifier, - precedingnodeaggregateidentifier, - succeedingnodeaggregateidentifier, + parentnodeaggregateid, + precedingnodeaggregateid, + succeedingnodeaggregateid, shortcuttarget FROM ' . $this->tableNamePrefix . '_uri diff --git a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjectionFactory.php b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjectionFactory.php index 13b4f140218..f744d6ea8fe 100644 --- a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjectionFactory.php +++ b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjectionFactory.php @@ -4,7 +4,7 @@ namespace Neos\Neos\FrontendRouting\Projection; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Factory\ProjectionFactoryDependencies; use Neos\ContentRepository\Core\Projection\CatchUpHookFactoryInterface; use Neos\ContentRepository\Core\Projection\ProjectionFactoryInterface; @@ -22,19 +22,17 @@ public function __construct( } public static function projectionTableNamePrefix( - ContentRepositoryIdentifier $contentRepositoryIdentifier + ContentRepositoryId $contentRepositoryId ): string { - $projectionShortName = strtolower(str_replace( - 'Projection', - '', - (new \ReflectionClass(DocumentUriPathProjection::class))->getShortName() - )); - - return sprintf( - 'cr_%s_p_neos_%s', - $contentRepositoryIdentifier, - $projectionShortName + $projectionShortName = strtolower( + str_replace( + 'Projection', + '', + (new \ReflectionClass(DocumentUriPathProjection::class))->getShortName() + ) ); + + return sprintf('cr_%s_p_neos_%s', $contentRepositoryId, $projectionShortName); } @@ -49,7 +47,7 @@ public function build( $projectionFactoryDependencies->eventNormalizer, $projectionFactoryDependencies->nodeTypeManager, $this->dbal, - self::projectionTableNamePrefix($projectionFactoryDependencies->contentRepositoryIdentifier) + self::projectionTableNamePrefix($projectionFactoryDependencies->contentRepositoryId) ); } } diff --git a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathSchemaBuilder.php b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathSchemaBuilder.php index cff55e5e545..5e19affb088 100644 --- a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathSchemaBuilder.php +++ b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathSchemaBuilder.php @@ -26,7 +26,7 @@ private function createUriTable(Schema $schema): void { $table = $schema->createTable($this->tableNamePrefix . '_uri'); - $table->addColumn('nodeaggregateidentifier', Types::STRING) + $table->addColumn('nodeaggregateid', Types::STRING) ->setLength(255) ->setDefault('') ->setNotnull(true); @@ -43,7 +43,7 @@ private function createUriTable(Schema $schema): void ->setUnsigned(true) ->setDefault(0) ->setNotnull(true); - $table->addColumn('nodeaggregateidentifierpath', Types::STRING) + $table->addColumn('nodeaggregateidpath', Types::STRING) ->setLength(4000) ->setDefault('') ->setNotnull(true); @@ -55,13 +55,13 @@ private function createUriTable(Schema $schema): void ->setLength(255) ->setDefault('') ->setNotnull(true); - $table->addColumn('parentnodeaggregateidentifier', Types::STRING) + $table->addColumn('parentnodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(false); - $table->addColumn('precedingnodeaggregateidentifier', Types::STRING) + $table->addColumn('precedingnodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(false); - $table->addColumn('succeedingnodeaggregateidentifier', Types::STRING) + $table->addColumn('succeedingnodeaggregateid', Types::STRING) ->setLength(255) ->setNotnull(false); $table->addColumn('shortcuttarget', Types::STRING) @@ -69,11 +69,11 @@ private function createUriTable(Schema $schema): void ->setNotnull(false); $table - ->addUniqueIndex(['nodeaggregateidentifier', 'dimensionspacepointhash'], 'variant') + ->addUniqueIndex(['nodeaggregateid', 'dimensionspacepointhash'], 'variant') ->addIndex([ - 'parentnodeaggregateidentifier', - 'precedingnodeaggregateidentifier', - 'succeedingnodeaggregateidentifier' + 'parentnodeaggregateid', + 'precedingnodeaggregateid', + 'succeedingnodeaggregateid' ], 'preceding_succeeding') ->addIndex(['sitenodename', 'uripath'], 'sitenode_uripath', [], ['lengths' => [null,100]]); } @@ -81,7 +81,7 @@ private function createUriTable(Schema $schema): void private function createLiveContentStreamsTable(Schema $schema): void { $table = $schema->createTable($this->tableNamePrefix . '_livecontentstreams'); - $table->addColumn('contentstreamidentifier', Types::STRING) + $table->addColumn('contentstreamid', Types::STRING) ->setLength(255) ->setDefault('') ->setNotnull(true); @@ -89,6 +89,6 @@ private function createLiveContentStreamsTable(Schema $schema): void ->setLength(255) ->setDefault('') ->setNotnull(true); - $table->setPrimaryKey(['contentstreamidentifier']); + $table->setPrimaryKey(['contentstreamid']); } } diff --git a/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php b/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php index 8161ddbeaca..5b19ca019ba 100644 --- a/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php +++ b/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php @@ -5,7 +5,7 @@ namespace Neos\Neos\FrontendRouting\SiteDetection; use Neos\Flow\Annotations as Flow; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Neos\Domain\Model\Site; use Neos\Neos\Domain\Repository\DomainRepository; use Neos\Neos\Domain\Repository\SiteRepository; @@ -55,7 +55,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface } assert($site instanceof Site); - $contentRepositoryIdentifier = ContentRepositoryIdentifier::fromString( + $contentRepositoryIdentifier = ContentRepositoryId::fromString( $site->getConfiguration()['contentRepository'] ?? throw new \RuntimeException( 'There is no content repository identifier configured in Sites configuration in Settings.yaml:' diff --git a/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionResult.php b/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionResult.php index 3983028b32a..d4ef6060165 100644 --- a/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionResult.php +++ b/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionResult.php @@ -5,7 +5,7 @@ namespace Neos\Neos\FrontendRouting\SiteDetection; use Neos\Flow\Annotations as Flow; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\Flow\Http\ServerRequestAttributes; use Neos\Flow\Mvc\Routing\Dto\RouteParameters; use Neos\Neos\Domain\Model\SiteNodeName; @@ -22,19 +22,19 @@ final class SiteDetectionResult { private const ROUTINGPARAMETER_SITENODENAME = 'siteNodeName'; - private const ROUTINGPARAMETER_CONTENTREPOSITORYIDENTIFIER = 'contentRepositoryIdentifier'; + private const ROUTINGPARAMETER_CONTENTREPOSITORYID = 'contentRepositoryId'; private function __construct( public readonly SiteNodeName $siteNodeName, - public readonly ContentRepositoryIdentifier $contentRepositoryIdentifier, + public readonly ContentRepositoryId $contentRepositoryId, ) { } public static function create( SiteNodeName $siteNodeName, - ContentRepositoryIdentifier $contentRepositoryIdentifier + ContentRepositoryId $contentRepositoryId ): self { - return new self($siteNodeName, $contentRepositoryIdentifier); + return new self($siteNodeName, $contentRepositoryId); } /** @@ -55,19 +55,19 @@ public static function fromRequest(ServerRequestInterface $request): self public static function fromRouteParameters(RouteParameters $routeParameters): self { $siteNodeName = $routeParameters->getValue(self::ROUTINGPARAMETER_SITENODENAME); - $contentRepositoryIdentifier = $routeParameters->getValue(self::ROUTINGPARAMETER_CONTENTREPOSITORYIDENTIFIER); + $contentRepositoryId = $routeParameters->getValue(self::ROUTINGPARAMETER_CONTENTREPOSITORYID); - if ($siteNodeName === null || $contentRepositoryIdentifier === null) { + if ($siteNodeName === null || $contentRepositoryId === null) { throw new \RuntimeException( 'Current site and content repository could not be extracted from the Request.' . ' SiteDetectionMiddleware must run before calling this method!' ); } assert(is_string($siteNodeName)); - assert(is_string($contentRepositoryIdentifier)); + assert(is_string($contentRepositoryId)); return new self( SiteNodeName::fromString($siteNodeName), - ContentRepositoryIdentifier::fromString($contentRepositoryIdentifier) + ContentRepositoryId::fromString($contentRepositoryId) ); } @@ -87,8 +87,8 @@ public function storeInRouteParameters(RouteParameters $routeParameters): RouteP $this->siteNodeName->value ) ->withParameter( - self::ROUTINGPARAMETER_CONTENTREPOSITORYIDENTIFIER, - $this->contentRepositoryIdentifier->value + self::ROUTINGPARAMETER_CONTENTREPOSITORYID, + $this->contentRepositoryId->value ); } } diff --git a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php index 7c6edcb51d2..2bd8dd71fc2 100644 --- a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php @@ -175,6 +175,6 @@ protected function getNodeLevelInSite(Node $node): int { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); - return $subgraph->findNodePath($node->nodeAggregateIdentifier)->getDepth() - 2; // sites always are depth 2; + return $subgraph->findNodePath($node->nodeAggregateId)->getDepth() - 2; // sites always are depth 2; } } diff --git a/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php b/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php index e2e3c82a7dd..bf11533a1ce 100644 --- a/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php +++ b/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php @@ -15,8 +15,8 @@ namespace Neos\Neos\Fusion\Cache; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; @@ -55,20 +55,20 @@ class ContentCacheFlusher * Main entry point to *directly* flush the caches of a given NodeAggregate * * @param ContentRepository $contentRepository - * @param ContentStreamIdentifier $contentStreamIdentifier - * @param NodeAggregateIdentifier $nodeAggregateIdentifier + * @param ContentStreamId $contentStreamIdentifier + * @param NodeAggregateId $nodeAggregateIdentifier */ public function flushNodeAggregate( ContentRepository $contentRepository, - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier ): void { $tagsToFlush = []; $tagsToFlush[ContentCache::TAG_EVERYTHING] = 'which were tagged with "Everything".'; $this->registerChangeOnNodeIdentifier($contentStreamIdentifier, $nodeAggregateIdentifier, $tagsToFlush); - $nodeAggregate = $contentRepository->getContentGraph()->findNodeAggregateByIdentifier( + $nodeAggregate = $contentRepository->getContentGraph()->findNodeAggregateById( $contentStreamIdentifier, $nodeAggregateIdentifier ); @@ -107,33 +107,33 @@ public function flushNodeAggregate( while ($nodeAggregate = array_shift($parentNodeAggregates)) { assert($nodeAggregate instanceof NodeAggregate); - if (isset($processedNodeAggregateIdentifiers[$nodeAggregate->nodeAggregateIdentifier->getValue()])) { + if (isset($processedNodeAggregateIdentifiers[$nodeAggregate->nodeAggregateId->getValue()])) { // we've already processed this NodeAggregateIdentifier (i.e. flushed the caches for it); // thus we can skip this one, and thus break the cycle. continue; } - $processedNodeAggregateIdentifiers[$nodeAggregate->nodeAggregateIdentifier->getValue()] = true; + $processedNodeAggregateIdentifiers[$nodeAggregate->nodeAggregateId->getValue()] = true; - $tagName = 'DescendantOf_%' . $nodeAggregate->contentStreamIdentifier - . '%_' . $nodeAggregate->nodeAggregateIdentifier; + $tagName = 'DescendantOf_%' . $nodeAggregate->contentStreamId + . '%_' . $nodeAggregate->nodeAggregateId; $tagsToFlush[$tagName] = sprintf( 'which were tagged with "%s" because node "%s" has changed.', $tagName, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->nodeAggregateId ); // Legacy - $legacyTagName = 'DescendantOf_' . $nodeAggregate->nodeAggregateIdentifier; + $legacyTagName = 'DescendantOf_' . $nodeAggregate->nodeAggregateId; $tagsToFlush[$legacyTagName] = sprintf( 'which were tagged with legacy "%s" because node "%s" has changed.', $legacyTagName, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->nodeAggregateId ); foreach ( $contentRepository->getContentGraph()->findParentNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ) as $parentNodeAggregate ) { $parentNodeAggregates[] = $parentNodeAggregate; @@ -152,8 +152,8 @@ public function flushNodeAggregate( * @param array &$tagsToFlush */ private function registerChangeOnNodeIdentifier( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier, array &$tagsToFlush ): void { $cacheIdentifier = '%' . $contentStreamIdentifier . '%_' . $nodeAggregateIdentifier; @@ -191,8 +191,8 @@ private function registerChangeOnNodeIdentifier( */ private function registerChangeOnNodeType( NodeTypeName $nodeTypeName, - ContentStreamIdentifier $contentStreamIdentifier, - ?NodeAggregateIdentifier $referenceNodeIdentifier, + ContentStreamId $contentStreamIdentifier, + ?NodeAggregateId $referenceNodeIdentifier, array &$tagsToFlush, ContentRepository $contentRepository ): void { diff --git a/Neos.Neos/Classes/Fusion/Cache/FusionCachingAspect.php b/Neos.Neos/Classes/Fusion/Cache/FusionCachingAspect.php index 88dfa47be12..f4fb4f3aee6 100644 --- a/Neos.Neos/Classes/Fusion/Cache/FusionCachingAspect.php +++ b/Neos.Neos/Classes/Fusion/Cache/FusionCachingAspect.php @@ -40,7 +40,7 @@ public function cacheGetMergedFusionObjectTree(JoinPointInterface $joinPoint) { /* @var Node $currentSiteNode */ $currentSiteNode = $joinPoint->getMethodArgument('startNode'); - $cacheIdentifier = $currentSiteNode->nodeAggregateIdentifier->jsonSerialize(); + $cacheIdentifier = $currentSiteNode->nodeAggregateId->jsonSerialize(); if ($this->fusionCache->has($cacheIdentifier)) { $fusionObjectTree = $this->fusionCache->get($cacheIdentifier); diff --git a/Neos.Neos/Classes/Fusion/Cache/GraphProjectorCatchUpHookForCacheFlushing.php b/Neos.Neos/Classes/Fusion/Cache/GraphProjectorCatchUpHookForCacheFlushing.php index 343d30ffc50..706ed144437 100644 --- a/Neos.Neos/Classes/Fusion/Cache/GraphProjectorCatchUpHookForCacheFlushing.php +++ b/Neos.Neos/Classes/Fusion/Cache/GraphProjectorCatchUpHookForCacheFlushing.php @@ -14,12 +14,12 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\EventStore\EventInterface; -use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateIdentifier; +use Neos\ContentRepository\Core\Feature\Common\EmbedsContentStreamAndNodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeRemoval\Event\NodeAggregateWasRemoved; use Neos\ContentRepository\Core\Projection\CatchUpHookInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\EventStore\Model\EventEnvelope; class GraphProjectorCatchUpHookForCacheFlushing implements CatchUpHookInterface @@ -43,21 +43,21 @@ public function onBeforeEvent(EventInterface $eventInstance, EventEnvelope $even // return; //} if ($eventInstance instanceof NodeAggregateWasRemoved) { - $nodeAggregate = $this->contentRepository->getContentGraph()->findNodeAggregateByIdentifier( - $eventInstance->getContentStreamIdentifier(), - $eventInstance->getNodeAggregateIdentifier() + $nodeAggregate = $this->contentRepository->getContentGraph()->findNodeAggregateById( + $eventInstance->getContentStreamId(), + $eventInstance->getNodeAggregateId() ); if ($nodeAggregate) { $parentNodeAggregates = $this->contentRepository->getContentGraph()->findParentNodeAggregates( - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ); foreach ($parentNodeAggregates as $parentNodeAggregate) { assert($parentNodeAggregate instanceof NodeAggregate); $this->scheduleCacheFlushJobForNodeAggregate( $this->contentRepository, - $parentNodeAggregate->contentStreamIdentifier, - $parentNodeAggregate->nodeAggregateIdentifier + $parentNodeAggregate->contentStreamId, + $parentNodeAggregate->nodeAggregateId ); } } @@ -74,18 +74,18 @@ public function onAfterEvent(EventInterface $eventInstance, EventEnvelope $event if ( !($eventInstance instanceof NodeAggregateWasRemoved) - && $eventInstance instanceof EmbedsContentStreamAndNodeAggregateIdentifier + && $eventInstance instanceof EmbedsContentStreamAndNodeAggregateId ) { - $nodeAggregate = $this->contentRepository->getContentGraph()->findNodeAggregateByIdentifier( - $eventInstance->getContentStreamIdentifier(), - $eventInstance->getNodeAggregateIdentifier() + $nodeAggregate = $this->contentRepository->getContentGraph()->findNodeAggregateById( + $eventInstance->getContentStreamId(), + $eventInstance->getNodeAggregateId() ); if ($nodeAggregate) { $this->scheduleCacheFlushJobForNodeAggregate( $this->contentRepository, - $nodeAggregate->contentStreamIdentifier, - $nodeAggregate->nodeAggregateIdentifier + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId ); } } @@ -97,8 +97,8 @@ public function onAfterEvent(EventInterface $eventInstance, EventEnvelope $event protected function scheduleCacheFlushJobForNodeAggregate( ContentRepository $contentRepository, - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier ): void { // we store this in an associative array deduplicate. $this->cacheFlushes[$contentStreamIdentifier->getValue() . '__' . $nodeAggregateIdentifier->getValue()] = [ diff --git a/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php b/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php index a534f577899..2ac84a6e28e 100644 --- a/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php +++ b/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php @@ -14,7 +14,7 @@ namespace Neos\Neos\Fusion; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; @@ -115,7 +115,7 @@ public function evaluate() } $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddress = NodeAddressFactory::create($contentRepository)->createFromNode($node); @@ -133,8 +133,8 @@ function (array $matches) use (&$unresolvedUris, $absolute, $nodeAddress) { $resolvedUri = null; switch ($matches[1]) { case 'node': - $nodeAddress = $nodeAddress->withNodeAggregateIdentifier( - NodeAggregateIdentifier::fromString($matches[2]) + $nodeAddress = $nodeAddress->withNodeAggregateId( + NodeAggregateId::fromString($matches[2]) ); $uriBuilder = new UriBuilder(); $uriBuilder->setRequest($this->runtime->getControllerContext()->getRequest()); diff --git a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php index e9dd1137d68..066919ce812 100644 --- a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php @@ -5,10 +5,10 @@ namespace Neos\Neos\Fusion; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\Dimension\ContentDimensionIdentifier; +use Neos\ContentRepository\Core\Dimension\ContentDimensionId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Annotations as Flow; @@ -44,7 +44,7 @@ public function getDimension(): array protected function buildItems(): array { $menuItems = []; - $contentRepositoryIdentifier = $this->currentNode->subgraphIdentity->contentRepositoryIdentifier; + $contentRepositoryIdentifier = $this->currentNode->subgraphIdentity->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get( $contentRepositoryIdentifier, ); @@ -66,18 +66,18 @@ protected function buildItems(): array } else { $variant = $contentRepository->getContentGraph() ->getSubgraph( - $this->currentNode->subgraphIdentity->contentStreamIdentifier, + $this->currentNode->subgraphIdentity->contentStreamId, $dimensionSpacePoint, $this->currentNode->subgraphIdentity->visibilityConstraints, ) - ->findNodeByNodeAggregateIdentifier($this->currentNode->nodeAggregateIdentifier); + ->findNodeByNodeAggregateId($this->currentNode->nodeAggregateId); } if (!$variant && $this->includeGeneralizations() && $contentDimensionIdentifierToLimitTo) { $variant = $this->findClosestGeneralizationMatchingDimensionValue( $dimensionSpacePoint, $contentDimensionIdentifierToLimitTo, - $this->currentNode->nodeAggregateIdentifier, + $this->currentNode->nodeAggregateId, $dimensionMenuItemsImplementationInternals, $contentRepository ); @@ -143,8 +143,8 @@ protected function isDimensionSpacePointRelevant(DimensionSpacePoint $dimensionS protected function findClosestGeneralizationMatchingDimensionValue( DimensionSpacePoint $dimensionSpacePoint, - ContentDimensionIdentifier $contentDimensionIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentDimensionId $contentDimensionIdentifier, + NodeAggregateId $nodeAggregateIdentifier, DimensionsMenuItemsImplementationInternals $dimensionMenuItemsImplementationInternals, ContentRepository $contentRepository ): ?Node { @@ -158,11 +158,11 @@ protected function findClosestGeneralizationMatchingDimensionValue( ) { $variant = $contentRepository->getContentGraph() ->getSubgraph( - $this->currentNode->subgraphIdentity->contentStreamIdentifier, + $this->currentNode->subgraphIdentity->contentStreamId, $generalization, $this->currentNode->subgraphIdentity->visibilityConstraints, ) - ->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier); + ->findNodeByNodeAggregateId($nodeAggregateIdentifier); if ($variant) { return $variant; } @@ -183,7 +183,7 @@ protected function determineMetadata( array_walk( $metadata, function (&$dimensionValue, $rawDimensionIdentifier) use ($dimensionMenuItemsImplementationInternals) { - $dimensionIdentifier = new ContentDimensionIdentifier($rawDimensionIdentifier); + $dimensionIdentifier = new ContentDimensionId($rawDimensionIdentifier); $dimensionValue = [ 'value' => $dimensionValue, 'label' => $dimensionMenuItemsImplementationInternals @@ -242,12 +242,12 @@ protected function includeGeneralizations(): bool } /** - * @return ContentDimensionIdentifier|null + * @return ContentDimensionId|null */ - protected function getContentDimensionIdentifierToLimitTo(): ?ContentDimensionIdentifier + protected function getContentDimensionIdentifierToLimitTo(): ?ContentDimensionId { return $this->fusionValue('dimension') - ? new ContentDimensionIdentifier($this->fusionValue('dimension')) + ? new ContentDimensionId($this->fusionValue('dimension')) : null; } diff --git a/Neos.Neos/Classes/Fusion/ExceptionHandlers/NodeWrappingHandler.php b/Neos.Neos/Classes/Fusion/ExceptionHandlers/NodeWrappingHandler.php index c1e080f8fa5..bc110b8edca 100644 --- a/Neos.Neos/Classes/Fusion/ExceptionHandlers/NodeWrappingHandler.php +++ b/Neos.Neos/Classes/Fusion/ExceptionHandlers/NodeWrappingHandler.php @@ -72,10 +72,10 @@ protected function handle($fusionPath, \Exception $exception, $referenceCode): s if (isset($currentContext['node'])) { /** @var Node $node */ $node = $currentContext['node']; - $contentRepositoryIdentifier = $node->subgraphIdentity->contentRepositoryIdentifier; + $contentRepositoryIdentifier = $node->subgraphIdentity->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); - $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamIdentifier( - $node->subgraphIdentity->contentStreamIdentifier + $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId( + $node->subgraphIdentity->contentStreamId ); $applicationContext = $this->environment->getContext(); diff --git a/Neos.Neos/Classes/Fusion/ExceptionHandlers/PageHandler.php b/Neos.Neos/Classes/Fusion/ExceptionHandlers/PageHandler.php index 853d3664d6b..f5bb43564a0 100644 --- a/Neos.Neos/Classes/Fusion/ExceptionHandlers/PageHandler.php +++ b/Neos.Neos/Classes/Fusion/ExceptionHandlers/PageHandler.php @@ -86,10 +86,10 @@ protected function handle($fusionPath, \Exception $exception, $referenceCode) } if (!is_null($documentNode)) { - $contentRepositoryIdentifier = $documentNode->subgraphIdentity->contentRepositoryIdentifier; + $contentRepositoryIdentifier = $documentNode->subgraphIdentity->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); - $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamIdentifier( - $documentNode->subgraphIdentity->contentStreamIdentifier + $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId( + $documentNode->subgraphIdentity->contentStreamId ); if ( $workspace && !$workspace->workspaceName->isLive() diff --git a/Neos.Neos/Classes/Fusion/Helper/CachingHelper.php b/Neos.Neos/Classes/Fusion/Helper/CachingHelper.php index d782c9bad9b..fd69343181d 100644 --- a/Neos.Neos/Classes/Fusion/Helper/CachingHelper.php +++ b/Neos.Neos/Classes/Fusion/Helper/CachingHelper.php @@ -16,7 +16,7 @@ use Neos\Flow\Annotations as Flow; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Eel\ProtectedContextAwareInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; @@ -62,8 +62,8 @@ protected function convertArrayOfNodesToArrayOfNodeIdentifiersWithPrefix(mixed $ foreach ($nodes as $node) { if ($node instanceof Node) { $prefixedNodeIdentifiers[] = $prefix . '_' - . $this->renderContentStreamIdentifierTag($node->subgraphIdentity->contentStreamIdentifier) - . '_' . $node->nodeAggregateIdentifier; + . $this->renderContentStreamIdentifierTag($node->subgraphIdentity->contentStreamId) + . '_' . $node->nodeAggregateId; } else { throw new Exception(sprintf( 'One of the elements in array passed to this helper was not a Node, but of type: "%s".', @@ -106,7 +106,7 @@ public function nodeTagForIdentifier(string $identifier, Node $contextNode = nul $contentStreamTag = ''; if ($contextNode instanceof Node) { $contentStreamTag = $this->renderContentStreamIdentifierTag( - $contextNode->subgraphIdentity->contentStreamIdentifier + $contextNode->subgraphIdentity->contentStreamId ) . '_'; } @@ -149,7 +149,7 @@ protected function getNodeTypeTagFor($nodeType, Node $contextNode = null) if ($contextNode instanceof Node) { $contentStreamTag = $this->renderContentStreamIdentifierTag( - $contextNode->subgraphIdentity->contentStreamIdentifier + $contextNode->subgraphIdentity->contentStreamId ) . '_'; } @@ -183,10 +183,10 @@ public function descendantOfTag(mixed $nodes): array } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamIdentifier * @return string */ - private function renderContentStreamIdentifierTag(ContentStreamIdentifier $contentStreamIdentifier) + private function renderContentStreamIdentifierTag(ContentStreamId $contentStreamIdentifier) { return '%' . $contentStreamIdentifier . '%'; } @@ -202,13 +202,13 @@ public function getWorkspaceChain(?Node $node): array } $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); /** @var Workspace $currentWorkspace */ - $currentWorkspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamIdentifier( - $node->subgraphIdentity->contentStreamIdentifier + $currentWorkspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId( + $node->subgraphIdentity->contentStreamId ); $workspaceChain = []; // TODO: Maybe write CTE here diff --git a/Neos.Neos/Classes/Fusion/Helper/LinkHelper.php b/Neos.Neos/Classes/Fusion/Helper/LinkHelper.php index c490c23d692..3e110d86cac 100644 --- a/Neos.Neos/Classes/Fusion/Helper/LinkHelper.php +++ b/Neos.Neos/Classes/Fusion/Helper/LinkHelper.php @@ -16,7 +16,7 @@ use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Eel\ProtectedContextAwareInterface; @@ -106,7 +106,7 @@ public function resolveNodeUri( return null; } $contentRepository = $this->contentRepositoryRegistry->get( - $targetNode->subgraphIdentity->contentRepositoryIdentifier + $targetNode->subgraphIdentity->contentRepositoryId ); $targetNodeAddress = NodeAddressFactory::create($contentRepository)->createFromNode($targetNode); try { @@ -119,7 +119,7 @@ public function resolveNodeUri( ) { $this->systemLogger->info(sprintf( 'Failed to build URI for node "%s": %e', - $targetNode->nodeAggregateIdentifier, + $targetNode->nodeAggregateId, $e->getMessage() ), LogEnvironment::fromMethodName(__METHOD__)); return null; @@ -167,7 +167,7 @@ public function convertUriToObject( ); } return $this->contentRepositoryRegistry->subgraphForNode($contextNode) - ->findNodeByNodeAggregateIdentifier(NodeAggregateIdentifier::fromString($matches[2])); + ->findNodeByNodeAggregateId(NodeAggregateId::fromString($matches[2])); case 'asset': /** @var AssetInterface|null $asset */ /** @noinspection OneTimeUseVariablesInspection */ diff --git a/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php b/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php index 606c1ffb9f1..cf5b54e550c 100644 --- a/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php +++ b/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php @@ -62,7 +62,7 @@ public function nearestContentCollection(Node $node, string $nodePath): Node return $subNode; } else { $nodePathOfNode = $this->contentRepositoryRegistry->subgraphForNode($node) - ->findNodePath($node->nodeAggregateIdentifier); + ->findNodePath($node->nodeAggregateId); throw new Exception(sprintf( 'No content collection of type %s could be found in the current node (%s) or at the path "%s".' . ' You might want to adjust your node type configuration and create the missing child node' @@ -101,7 +101,7 @@ public function isOfType(Node $node, string $nodeType): bool public function nodeAddressToString(Node $node): string { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); return $nodeAddressFactory->createFromNode($node)->serializeForUri(); @@ -123,7 +123,7 @@ private function findRootNode(Node $node): Node { while (true) { $parentNode = $this->contentRepositoryRegistry->subgraphForNode($node) - ->findParentNode($node->nodeAggregateIdentifier); + ->findParentNode($node->nodeAggregateId); if ($parentNode === null) { // there is no parent, so the root node was the node before return $node; @@ -137,7 +137,7 @@ private function findNodeByPath(Node $node, NodePath $nodePath): ?Node { foreach ($nodePath->getParts() as $nodeName) { $childNode = $this->contentRepositoryRegistry->subgraphForNode($node) - ->findChildNodeConnectedThroughEdgeName($node->nodeAggregateIdentifier, $nodeName); + ->findChildNodeConnectedThroughEdgeName($node->nodeAggregateId, $nodeName); if ($childNode === null) { // we cannot find the child node, so there is no node on this path return null; diff --git a/Neos.Neos/Classes/Fusion/Helper/RenderingHelper.php b/Neos.Neos/Classes/Fusion/Helper/RenderingHelper.php index f5cc8aaacad..05aa51a786f 100644 --- a/Neos.Neos/Classes/Fusion/Helper/RenderingHelper.php +++ b/Neos.Neos/Classes/Fusion/Helper/RenderingHelper.php @@ -14,7 +14,7 @@ namespace Neos\Neos\Fusion\Helper; -use Neos\ContentRepository\Core\Dimension\ContentDimensionIdentifier; +use Neos\ContentRepository\Core\Dimension\ContentDimensionId; use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; use Neos\Eel\ProtectedContextAwareInterface; use Neos\Flow\Annotations as Flow; diff --git a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php index bc9778ebe07..1d4f5e785ce 100644 --- a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifiers; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraintsWithSubNodeTypes; use Neos\ContentRepository\Core\NodeType\NodeTypeName; @@ -154,7 +154,7 @@ protected function buildItems(): array $subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->currentNode); if (!is_null($this->getItemCollection())) { $childSubtree = $subgraph->findSubtrees( - NodeAggregateIdentifiers::fromNodes($this->getItemCollection()), + NodeAggregateIds::fromNodes($this->getItemCollection()), $this->getMaximumLevels(), $this->getNodeTypeConstraints() ); @@ -165,7 +165,7 @@ protected function buildItems(): array } $childSubtree = $subgraph->findSubtrees( - NodeAggregateIdentifiers::create($entryParentNode->nodeAggregateIdentifier), + NodeAggregateIds::create($entryParentNode->nodeAggregateId), $this->getMaximumLevels(), $this->getNodeTypeConstraints() ); @@ -229,7 +229,7 @@ protected function findMenuStartingPoint(): ?Node $fusionContext = $this->runtime->getCurrentContext(); $traversalStartingPoint = $this->getStartingPoint() ?: $fusionContext['node'] ?? null; - $contentRepositoryIdentifier = $this->currentNode->subgraphIdentity->contentRepositoryIdentifier; + $contentRepositoryIdentifier = $this->currentNode->subgraphIdentity->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); if (!$traversalStartingPoint instanceof Node) { @@ -314,7 +314,7 @@ protected function traverseUpUntilCondition(Node $node, \Closure $callback): voi $subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); do { $shouldContinueTraversal = $callback($node); - $node = $subgraph->findParentNode($node->nodeAggregateIdentifier); + $node = $subgraph->findParentNode($node->nodeAggregateId); } while ($shouldContinueTraversal !== false && $node !== null); } } diff --git a/Neos.Neos/Classes/Fusion/NodeUriImplementation.php b/Neos.Neos/Classes/Fusion/NodeUriImplementation.php index 959052bfbfd..68f08ba0388 100644 --- a/Neos.Neos/Classes/Fusion/NodeUriImplementation.php +++ b/Neos.Neos/Classes/Fusion/NodeUriImplementation.php @@ -122,7 +122,7 @@ public function evaluate() $node = $this->getNode(); if ($node instanceof Node) { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeAddress = $nodeAddressFactory->createFromNode($node); diff --git a/Neos.Neos/Classes/Fusion/PluginViewImplementation.php b/Neos.Neos/Classes/Fusion/PluginViewImplementation.php index 181ffa261d3..83fb339b3d9 100644 --- a/Neos.Neos/Classes/Fusion/PluginViewImplementation.php +++ b/Neos.Neos/Classes/Fusion/PluginViewImplementation.php @@ -15,7 +15,7 @@ namespace Neos\Neos\Fusion; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Annotations as Flow; use Neos\Flow\Mvc\ActionRequest; @@ -72,8 +72,8 @@ protected function buildPluginRequest(): ActionRequest // Set the node to render this to the master plugin node $subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->pluginViewNode); - $node = $subgraph->findNodeByNodeAggregateIdentifier( - NodeAggregateIdentifier::fromString($pluginNodeIdentifier) + $node = $subgraph->findNodeByNodeAggregateId( + NodeAggregateId::fromString($pluginNodeIdentifier) ); $this->node = $node; if ($node === null) { diff --git a/Neos.Neos/Classes/Package.php b/Neos.Neos/Classes/Package.php index a83e763c8b1..bcd46166c3d 100644 --- a/Neos.Neos/Classes/Package.php +++ b/Neos.Neos/Classes/Package.php @@ -158,7 +158,7 @@ function (string $oldUriPath, string $newUriPath, NodePropertiesWereSet $event) $newUriPath, 301, [], - (string)$event->initiatingUserIdentifier, + (string)$event->initiatingUserId, 'via DocumentUriPathProjector' ); } diff --git a/Neos.Neos/Classes/PendingChangesProjection/Change.php b/Neos.Neos/Classes/PendingChangesProjection/Change.php index 24f0aa488c5..f0ae8872519 100644 --- a/Neos.Neos/Classes/PendingChangesProjection/Change.php +++ b/Neos.Neos/Classes/PendingChangesProjection/Change.php @@ -16,8 +16,8 @@ use Neos\Flow\Annotations as Flow; use Doctrine\DBAL\Connection; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\NodeRemoval\Command\RemoveNodeAggregate; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; @@ -30,12 +30,12 @@ class Change { /** - * @var ContentStreamIdentifier + * @var ContentStreamId */ public $contentStreamIdentifier; /** - * @var NodeAggregateIdentifier + * @var NodeAggregateId */ public $nodeAggregateIdentifier; @@ -62,16 +62,16 @@ class Change /** * {@see RemoveNodeAggregate::$removalAttachmentPoint} for docs */ - public ?NodeAggregateIdentifier $removalAttachmentPoint; + public ?NodeAggregateId $removalAttachmentPoint; public function __construct( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint, bool $changed, bool $moved, bool $deleted, - ?NodeAggregateIdentifier $removalAttachmentPoint = null + ?NodeAggregateId $removalAttachmentPoint = null ) { $this->contentStreamIdentifier = $contentStreamIdentifier; $this->nodeAggregateIdentifier = $nodeAggregateIdentifier; @@ -125,14 +125,14 @@ public function updateToDatabase(Connection $databaseConnection, string $tableNa public static function fromDatabaseRow(array $databaseRow): self { return new self( - ContentStreamIdentifier::fromString($databaseRow['contentStreamIdentifier']), - NodeAggregateIdentifier::fromString($databaseRow['nodeAggregateIdentifier']), + ContentStreamId::fromString($databaseRow['contentStreamIdentifier']), + NodeAggregateId::fromString($databaseRow['nodeAggregateIdentifier']), OriginDimensionSpacePoint::fromJsonString($databaseRow['originDimensionSpacePoint']), (bool)$databaseRow['changed'], (bool)$databaseRow['moved'], (bool)$databaseRow['deleted'], isset($databaseRow['removalAttachmentPoint']) - ? NodeAggregateIdentifier::fromString($databaseRow['removalAttachmentPoint']) + ? NodeAggregateId::fromString($databaseRow['removalAttachmentPoint']) : null ); } diff --git a/Neos.Neos/Classes/PendingChangesProjection/ChangeFinder.php b/Neos.Neos/Classes/PendingChangesProjection/ChangeFinder.php index f2dfa6ca4e1..f2c47dbb555 100644 --- a/Neos.Neos/Classes/PendingChangesProjection/ChangeFinder.php +++ b/Neos.Neos/Classes/PendingChangesProjection/ChangeFinder.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ProjectionStateInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\Flow\Annotations as Flow; /** @@ -38,10 +38,10 @@ public function __construct( } /** - * @param ContentStreamIdentifier $contentStreamIdentifier + * @param ContentStreamId $contentStreamIdentifier * @return array|Change[] */ - public function findByContentStreamIdentifier(ContentStreamIdentifier $contentStreamIdentifier): array + public function findByContentStreamIdentifier(ContentStreamId $contentStreamIdentifier): array { $connection = $this->client->getConnection(); $changeRows = $connection->executeQuery( @@ -60,7 +60,7 @@ public function findByContentStreamIdentifier(ContentStreamIdentifier $contentSt return $changes; } - public function countByContentStreamIdentifier(ContentStreamIdentifier $contentStreamIdentifier): int + public function countByContentStreamIdentifier(ContentStreamId $contentStreamIdentifier): int { $connection = $this->client->getConnection(); return (int)$connection->executeQuery( diff --git a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php index dc55b3650e3..5b336e857d0 100644 --- a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php +++ b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php @@ -27,7 +27,7 @@ use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodeSpecializationVariantWasCreated; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\Projection\ProjectionInterface; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event\DimensionSpacePointWasMoved; use Neos\ContentRepository\Core\Feature\NodeMove\Event\NodeAggregateWasMoved; use Neos\ContentRepository\Core\Feature\NodeRemoval\Event\NodeAggregateWasRemoved; @@ -38,7 +38,7 @@ use Neos\ContentRepository\Core\Feature\NodeDisabling\Event\NodeAggregateWasEnabled; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; use Neos\ContentRepository\Core\Projection\Workspace\WorkspaceFinder; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\EventStore\CatchUp\CatchUp; use Neos\EventStore\DoctrineAdapter\DoctrineCheckpointStorage; use Neos\EventStore\Model\Event; @@ -217,8 +217,8 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void $mapping = iterator_to_array($event->nodeMoveMappings); $this->markAsMoved( - $event->getContentStreamIdentifier(), - $event->getNodeAggregateIdentifier(), + $event->getContentStreamId(), + $event->getNodeAggregateId(), $mapping[0]->movedNodeOrigin ); } @@ -226,8 +226,8 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void private function whenNodePropertiesWereSet(NodePropertiesWereSet $event): void { $this->markAsChanged( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->originDimensionSpacePoint ); } @@ -235,8 +235,8 @@ private function whenNodePropertiesWereSet(NodePropertiesWereSet $event): void private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCreated $event): void { $this->markAsChanged( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->originDimensionSpacePoint ); } @@ -245,8 +245,8 @@ private function whenNodeAggregateWasDisabled(NodeAggregateWasDisabled $event): { foreach ($event->affectedDimensionSpacePoints as $dimensionSpacePoint) { $this->markAsChanged( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, OriginDimensionSpacePoint::fromDimensionSpacePoint($dimensionSpacePoint) ); } @@ -256,8 +256,8 @@ private function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): vo { foreach ($event->affectedDimensionSpacePoints as $dimensionSpacePoint) { $this->markAsChanged( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, OriginDimensionSpacePoint::fromDimensionSpacePoint($dimensionSpacePoint) ); } @@ -266,8 +266,8 @@ private function whenNodeAggregateWasEnabled(NodeAggregateWasEnabled $event): vo private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): void { $this->transactional(function () use ($event) { - $workspace = $this->workspaceFinder->findOneByCurrentContentStreamIdentifier( - $event->contentStreamIdentifier + $workspace = $this->workspaceFinder->findOneByCurrentContentStreamId( + $event->contentStreamId ); if ($workspace instanceof Workspace && $workspace->baseWorkspaceName === null) { // Workspace is the live workspace (has no base workspace); we do not need to do anything @@ -282,8 +282,8 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo AND originDimensionSpacePointHash IN (:affectedDimensionSpacePointHashes) ', [ - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$event->nodeAggregateIdentifier, + 'contentStreamIdentifier' => (string)$event->contentStreamId, + 'nodeAggregateIdentifier' => (string)$event->nodeAggregateId, 'affectedDimensionSpacePointHashes' => $event->affectedCoveredDimensionSpacePoints ->getPointHashes() ], @@ -309,8 +309,8 @@ private function whenNodeAggregateWasRemoved(NodeAggregateWasRemoved $event): vo ) ', [ - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier, - 'nodeAggregateIdentifier' => (string)$event->nodeAggregateIdentifier, + 'contentStreamIdentifier' => (string)$event->contentStreamId, + 'nodeAggregateIdentifier' => (string)$event->nodeAggregateId, 'originDimensionSpacePoint' => json_encode($occupiedDimensionSpacePoint), 'originDimensionSpacePointHash' => $occupiedDimensionSpacePoint->hash, 'removalAttachmentPoint' => $event->removalAttachmentPoint?->__toString() @@ -337,7 +337,7 @@ private function whenDimensionSpacePointWasMoved(DimensionSpacePointWasMoved $ev 'originalDimensionSpacePointHash' => $event->source->hash, 'newDimensionSpacePointHash' => $event->target->hash, 'newDimensionSpacePoint' => json_encode($event->target->jsonSerialize()), - 'contentStreamIdentifier' => (string)$event->contentStreamIdentifier + 'contentStreamIdentifier' => (string)$event->contentStreamId ] ); }); @@ -347,8 +347,8 @@ private function whenDimensionSpacePointWasMoved(DimensionSpacePointWasMoved $ev private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVariantWasCreated $event): void { $this->markAsChanged( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->specializationOrigin ); } @@ -356,8 +356,8 @@ private function whenNodeSpecializationVariantWasCreated(NodeSpecializationVaria private function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVariantWasCreated $event): void { $this->markAsChanged( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->generalizationOrigin ); } @@ -365,15 +365,15 @@ private function whenNodeGeneralizationVariantWasCreated(NodeGeneralizationVaria private function whenNodePeerVariantWasCreated(NodePeerVariantWasCreated $event): void { $this->markAsChanged( - $event->contentStreamIdentifier, - $event->nodeAggregateIdentifier, + $event->contentStreamId, + $event->nodeAggregateId, $event->peerOrigin ); } private function markAsChanged( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint ): void { $this->transactional(function () use ( @@ -384,7 +384,7 @@ private function markAsChanged( // HACK: basically we are not allowed to read other Projection's finder methods here; // but we nevertheless do it. // we can maybe figure out another way of solving this lateron. - $workspace = $this->workspaceFinder->findOneByCurrentContentStreamIdentifier($contentStreamIdentifier); + $workspace = $this->workspaceFinder->findOneByCurrentContentStreamId($contentStreamIdentifier); if ($workspace instanceof Workspace && $workspace->baseWorkspaceName === null) { // Workspace is the live workspace (has no base workspace); we do not need to do anything return; @@ -412,8 +412,8 @@ private function markAsChanged( } private function markAsMoved( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint ): void { $this->transactional(function () use ( @@ -421,7 +421,7 @@ private function markAsMoved( $nodeAggregateIdentifier, $originDimensionSpacePoint ) { - $workspace = $this->workspaceFinder->findOneByCurrentContentStreamIdentifier($contentStreamIdentifier); + $workspace = $this->workspaceFinder->findOneByCurrentContentStreamId($contentStreamIdentifier); if ($workspace instanceof Workspace && $workspace->baseWorkspaceName === null) { // Workspace is the live workspace (has no base workspace); we do not need to do anything return; @@ -449,8 +449,8 @@ private function markAsMoved( } private function getChange( - ContentStreamIdentifier $contentStreamIdentifier, - NodeAggregateIdentifier $nodeAggregateIdentifier, + ContentStreamId $contentStreamIdentifier, + NodeAggregateId $nodeAggregateIdentifier, OriginDimensionSpacePoint $originDimensionSpacePoint ): ?Change { $changeRow = $this->getDatabaseConnection()->executeQuery( diff --git a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjectionFactory.php b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjectionFactory.php index 883bc66f7ac..823b591be5e 100644 --- a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjectionFactory.php +++ b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjectionFactory.php @@ -53,7 +53,7 @@ public function build( $workspaceFinder, sprintf( 'cr_%s_p_neos_%s', - $projectionFactoryDependencies->contentRepositoryIdentifier, + $projectionFactoryDependencies->contentRepositoryId, $projectionShortName ), ); diff --git a/Neos.Neos/Classes/Presentation/Dimensions/VisualContentDimension.php b/Neos.Neos/Classes/Presentation/Dimensions/VisualContentDimension.php index 4acdf06ec3f..cd440ce35fb 100644 --- a/Neos.Neos/Classes/Presentation/Dimensions/VisualContentDimension.php +++ b/Neos.Neos/Classes/Presentation/Dimensions/VisualContentDimension.php @@ -78,8 +78,8 @@ public static function fromContentDimension( return new self( $offset, - (string)$contentDimension->identifier, - $contentDimension->getConfigurationValue('label') ?: (string)$contentDimension->identifier, + (string)$contentDimension->id, + $contentDimension->getConfigurationValue('label') ?: (string)$contentDimension->id, $nodes, $edges ); diff --git a/Neos.Neos/Classes/Presentation/Dimensions/VisualInterDimensionalVariationGraph.php b/Neos.Neos/Classes/Presentation/Dimensions/VisualInterDimensionalVariationGraph.php index 4f7740f5d3c..cef90e65519 100644 --- a/Neos.Neos/Classes/Presentation/Dimensions/VisualInterDimensionalVariationGraph.php +++ b/Neos.Neos/Classes/Presentation/Dimensions/VisualInterDimensionalVariationGraph.php @@ -48,7 +48,7 @@ public static function forInterDimensionalVariationGraph( $height = 0; foreach ($contentDimensionSource->getContentDimensionsOrderedByPriority() as $contentDimension) { - $identifier = (string)$contentDimension->identifier; + $identifier = (string)$contentDimension->id; $offsets[$identifier] = self::resolveOffsets($contentDimension); } diff --git a/Neos.Neos/Classes/Presentation/Dimensions/VisualIntraDimensionalVariationGraph.php b/Neos.Neos/Classes/Presentation/Dimensions/VisualIntraDimensionalVariationGraph.php index 0808d301b78..5fcc079ade0 100644 --- a/Neos.Neos/Classes/Presentation/Dimensions/VisualIntraDimensionalVariationGraph.php +++ b/Neos.Neos/Classes/Presentation/Dimensions/VisualIntraDimensionalVariationGraph.php @@ -40,7 +40,7 @@ public static function fromContentDimensionSource(ContentDimensionSourceInterfac $height = 0; foreach ($contentDimensionSource->getContentDimensionsOrderedByPriority() as $contentDimension) { - $dimensions[(string)$contentDimension->identifier] = VisualContentDimension::fromContentDimension( + $dimensions[(string)$contentDimension->id] = VisualContentDimension::fromContentDimension( $contentDimension, $horizontalOffset, $counter, diff --git a/Neos.Neos/Classes/Routing/Cache/RouteCacheFlusher.php b/Neos.Neos/Classes/Routing/Cache/RouteCacheFlusher.php index c98e304d9c3..01cc2c84452 100644 --- a/Neos.Neos/Classes/Routing/Cache/RouteCacheFlusher.php +++ b/Neos.Neos/Classes/Routing/Cache/RouteCacheFlusher.php @@ -46,7 +46,7 @@ class RouteCacheFlusher */ public function registerNodeChange(Node $node) { - $identifier = (string)$node->nodeAggregateIdentifier; + $identifier = (string)$node->nodeAggregateId; if (in_array($identifier, $this->tagsToFlush)) { return; } diff --git a/Neos.Neos/Classes/Routing/NodeIdentityConverterAspect.php b/Neos.Neos/Classes/Routing/NodeIdentityConverterAspect.php index af448a5854f..ad0b8f44832 100644 --- a/Neos.Neos/Classes/Routing/NodeIdentityConverterAspect.php +++ b/Neos.Neos/Classes/Routing/NodeIdentityConverterAspect.php @@ -48,7 +48,7 @@ public function convertNodeToContextPathForRouting(JoinPointInterface $joinPoint $objectArgument = $joinPoint->getMethodArgument('object'); if ($objectArgument instanceof Node) { $contentRepository = $this->contentRepositoryRegistry->get( - $objectArgument->subgraphIdentity->contentRepositoryIdentifier + $objectArgument->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeAddress = $nodeAddressFactory->createFromNode($objectArgument); diff --git a/Neos.Neos/Classes/Service/BackendRedirectionService.php b/Neos.Neos/Classes/Service/BackendRedirectionService.php index baa49ba6251..b5ab8724cf5 100644 --- a/Neos.Neos/Classes/Service/BackendRedirectionService.php +++ b/Neos.Neos/Classes/Service/BackendRedirectionService.php @@ -164,7 +164,7 @@ public function getAfterLogoutRedirectionUri(ActionRequest $actionRequest): ?str protected function getLastVisitedNode(string $workspaceName, ActionRequest $actionRequest): ?Node { $contentRepositoryIdentifier = SiteDetectionResult::fromRequest($actionRequest->getHttpRequest()) - ->contentRepositoryIdentifier; + ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $workspace = $contentRepository->getWorkspaceFinder()->findOneByName(WorkspaceName::fromString($workspaceName)); if (!$workspace || !$this->session->isStarted() || !$this->session->hasKey('lastVisitedNode')) { @@ -178,10 +178,10 @@ protected function getLastVisitedNode(string $workspaceName, ActionRequest $acti ); return $contentRepository->getContentGraph()->getSubgraph( - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, $lastVisitedNode->subgraphIdentity->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() - )->findNodeByNodeAggregateIdentifier($lastVisitedNode->nodeAggregateIdentifier); + )->findNodeByNodeAggregateId($lastVisitedNode->nodeAggregateId); } catch (\Exception $exception) { return null; } diff --git a/Neos.Neos/Classes/Service/ContentElementEditableService.php b/Neos.Neos/Classes/Service/ContentElementEditableService.php index 3a657a70b32..c3a396b5f43 100644 --- a/Neos.Neos/Classes/Service/ContentElementEditableService.php +++ b/Neos.Neos/Classes/Service/ContentElementEditableService.php @@ -15,7 +15,7 @@ namespace Neos\Neos\Service; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; @@ -60,12 +60,12 @@ class ContentElementEditableService public function wrapContentProperty(Node $node, string $property, string $content): string { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); if ( $this->isContentStreamOfLiveWorkspace( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $contentRepository ) ) { @@ -88,11 +88,11 @@ public function wrapContentProperty(Node $node, string $property, string $conten } private function isContentStreamOfLiveWorkspace( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, ContentRepository $contentRepository ): bool { return $contentRepository->getWorkspaceFinder() - ->findOneByCurrentContentStreamIdentifier($contentStreamIdentifier) + ->findOneByCurrentContentStreamId($contentStreamIdentifier) ?->workspaceName->isLive() ?: false; } } diff --git a/Neos.Neos/Classes/Service/ContentElementWrappingService.php b/Neos.Neos/Classes/Service/ContentElementWrappingService.php index 494e338e52e..62f917b08fe 100644 --- a/Neos.Neos/Classes/Service/ContentElementWrappingService.php +++ b/Neos.Neos/Classes/Service/ContentElementWrappingService.php @@ -18,7 +18,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Security\Service\AuthorizationService; use Neos\Neos\FrontendRouting\NodeAddressFactory; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Annotations as Flow; use Neos\Flow\Security\Authorization\PrivilegeManagerInterface; @@ -109,12 +109,12 @@ public function wrapContentObject( array $additionalAttributes = [] ): ?string { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); if ( $this->isContentStreamOfLiveWorkspace( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $contentRepository ) ) { @@ -162,7 +162,7 @@ public function wrapCurrentDocumentMetadata( ?Node $siteNode = null ): string { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); if ($this->needsMetadata($node, $contentRepository, true) === false) { return $content; @@ -188,12 +188,12 @@ public function wrapCurrentDocumentMetadata( protected function addGenericEditingMetadata(array $attributes, Node $node): array { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddress = NodeAddressFactory::create($contentRepository)->createFromNode($node); $attributes['typeof'] = 'typo3:' . $node->nodeType->getName(); $attributes['about'] = $nodeAddress->serializeForUri(); - $attributes['data-node-_identifier'] = (string)$node->nodeAggregateIdentifier; + $attributes['data-node-_identifier'] = (string)$node->nodeAggregateId; $attributes['data-node-__workspace-name'] = $nodeAddress->workspaceName; $attributes['data-node-__label'] = $node->getLabel(); @@ -202,7 +202,7 @@ protected function addGenericEditingMetadata(array $attributes, Node $node): arr } $subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); - $parentNode = $subgraph->findParentNode($node->nodeAggregateIdentifier); + $parentNode = $subgraph->findParentNode($node->nodeAggregateId); // these properties are needed together with the current NodeType to evaluate Node Type Constraints // TODO: this can probably be greatly cleaned up once we do not use CreateJS or VIE anymore. if ($parentNode) { @@ -220,7 +220,7 @@ protected function addGenericEditingMetadata(array $attributes, Node $node): arr // as the Node-Type-Switcher in the UI relies on that. $attributes['data-node-__parent-node-name'] = $parentNode->nodeName; $attributes['data-node-__grandparent-node-type'] - = $subgraph->findParentNode($parentNode->nodeAggregateIdentifier)?->nodeType->getName(); + = $subgraph->findParentNode($parentNode->nodeAggregateId)?->nodeType->getName(); } return $attributes; @@ -298,7 +298,7 @@ protected function addDocumentMetadata( $siteNode = $siteCandidate; break; } - $siteCandidate = $subgraph->findParentNode($siteCandidate->nodeAggregateIdentifier); + $siteCandidate = $subgraph->findParentNode($siteCandidate->nodeAggregateId); } } $siteNodeAddress = null; @@ -350,11 +350,11 @@ protected function addCssClasses(array $attributes, Node $node, array $initialCl protected function appendNonRenderedContentNodeMetadata(Node $documentNode): void { $contentRepository = $this->contentRepositoryRegistry->get( - $documentNode->subgraphIdentity->contentRepositoryIdentifier + $documentNode->subgraphIdentity->contentRepositoryId ); if ( $this->isContentStreamOfLiveWorkspace( - $documentNode->subgraphIdentity->contentStreamIdentifier, + $documentNode->subgraphIdentity->contentStreamId, $contentRepository ) ) { @@ -366,12 +366,12 @@ protected function appendNonRenderedContentNodeMetadata(Node $documentNode): voi $nodeAddressFactory = NodeAddressFactory::create($contentRepository); - foreach ($subgraph->findChildNodes($documentNode->nodeAggregateIdentifier) as $node) { + foreach ($subgraph->findChildNodes($documentNode->nodeAggregateId) as $node) { if ($node->nodeType->isOfType('Neos.Neos:Document') === true) { continue; } - if (isset($this->renderedNodes[(string)$node->nodeAggregateIdentifier]) === false) { + if (isset($this->renderedNodes[(string)$node->nodeAggregateId]) === false) { $serializedNode = json_encode($this->nodeInfoHelper->renderNode($node)); $nodeContextPath = $nodeAddressFactory->createFromNode($node)->serializeForUri(); /** @codingStandardsIgnoreStart */ @@ -379,7 +379,7 @@ protected function appendNonRenderedContentNodeMetadata(Node $documentNode): voi /** @codingStandardsIgnoreEnd */ } - $nestedNodes = $subgraph->findChildNodes($node->nodeAggregateIdentifier); + $nestedNodes = $subgraph->findChildNodes($node->nodeAggregateId); $hasChildNodes = false; foreach ($nestedNodes as $nestedNode) { $hasChildNodes = true; @@ -439,7 +439,7 @@ protected function needsMetadata( bool $renderCurrentDocumentMetadata ): bool { return $this->isContentStreamOfLiveWorkspace( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $contentRepository ) && ($renderCurrentDocumentMetadata === true @@ -447,11 +447,11 @@ protected function needsMetadata( } private function isContentStreamOfLiveWorkspace( - ContentStreamIdentifier $contentStreamIdentifier, + ContentStreamId $contentStreamIdentifier, ContentRepository $contentRepository ): bool { return $contentRepository->getWorkspaceFinder() - ->findOneByCurrentContentStreamIdentifier($contentStreamIdentifier) + ->findOneByCurrentContentStreamId($contentStreamIdentifier) ?->workspaceName->isLive() ?: false; } } diff --git a/Neos.Neos/Classes/Service/Controller/AbstractServiceController.php b/Neos.Neos/Classes/Service/Controller/AbstractServiceController.php index 6bc58d39d18..952deabd287 100644 --- a/Neos.Neos/Classes/Service/Controller/AbstractServiceController.php +++ b/Neos.Neos/Classes/Service/Controller/AbstractServiceController.php @@ -14,7 +14,7 @@ namespace Neos\Neos\Service\Controller; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\Flow\Annotations as Flow; use Neos\Flow\Exception as FlowException; use Neos\Flow\Log\ThrowableStorageInterface; @@ -156,12 +156,12 @@ protected function convertException(\Throwable $exception): array return $exceptionData; } - protected function getCurrentUserIdentifier(): ?UserIdentifier + protected function getCurrentUserIdentifier(): ?UserId { $user = $this->domainUserService->getCurrentUser(); return $user - ? UserIdentifier::fromString($this->persistenceManager->getIdentifierByObject($user)) + ? UserId::fromString($this->persistenceManager->getIdentifierByObject($user)) : null; } } diff --git a/Neos.Neos/Classes/Service/EditorContentStreamZookeeper.php b/Neos.Neos/Classes/Service/EditorContentStreamZookeeper.php index f6f732ea98b..472620630d2 100644 --- a/Neos.Neos/Classes/Service/EditorContentStreamZookeeper.php +++ b/Neos.Neos/Classes/Service/EditorContentStreamZookeeper.php @@ -17,8 +17,8 @@ use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Command\RebaseWorkspace; use Neos\ContentRepository\Core\Projection\Workspace\Workspace; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; -use Neos\ContentRepository\Core\SharedModel\User\UserIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle; @@ -92,7 +92,7 @@ public function relayEditorAuthentication(Authentication\TokenInterface $token): $requestHandler = $this->bootstrap->getActiveRequestHandler(); assert($requestHandler instanceof HttpRequestHandlerInterface); $siteDetectionResult = SiteDetectionResult::fromRequest($requestHandler->getHttpRequest()); - $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryId); $isEditor = false; foreach ($token->getAccount()->getRoles() as $role) { @@ -113,12 +113,12 @@ public function relayEditorAuthentication(Authentication\TokenInterface $token): $workspaceName->toContentRepositoryWorkspaceName() ); - $userIdentifier = UserIdentifier::fromString($this->persistenceManager->getIdentifierByObject($user)); + $userIdentifier = UserId::fromString($this->persistenceManager->getIdentifierByObject($user)); if (!$workspace) { // @todo: find base workspace for user /** @var Workspace $baseWorkspace */ $baseWorkspace = $contentRepository->getWorkspaceFinder()->findOneByName(WorkspaceName::forLive()); - $editorsNewContentStreamIdentifier = ContentStreamIdentifier::create(); + $editorsNewContentStreamIdentifier = ContentStreamId::create(); $similarlyNamedWorkspaces = $contentRepository->getWorkspaceFinder()->findByPrefix( $workspaceName->toContentRepositoryWorkspaceName() ); diff --git a/Neos.Neos/Classes/Service/ImageVariantGarbageCollector.php b/Neos.Neos/Classes/Service/ImageVariantGarbageCollector.php index b3df15e92b2..3689245ac38 100644 --- a/Neos.Neos/Classes/Service/ImageVariantGarbageCollector.php +++ b/Neos.Neos/Classes/Service/ImageVariantGarbageCollector.php @@ -77,9 +77,9 @@ public function removeUnusedImageVariant(Node $node, $propertyName, $oldValue, $ // If the result contains exactly the node that got a new ImageVariant assigned // then we are safe to remove the asset here. if ( - $usageItem->contentStreamIdentifier === $node->subgraphIdentity->contentStreamIdentifier + $usageItem->contentStreamIdentifier === $node->subgraphIdentity->contentStreamId && $usageItem->originDimensionSpacePoint === $node->originDimensionSpacePoint->hash - && $usageItem->nodeAggregateIdentifier === $node->nodeAggregateIdentifier + && $usageItem->nodeAggregateIdentifier === $node->nodeAggregateId ) { $this->assetRepository->remove($oldValue); } diff --git a/Neos.Neos/Classes/Service/LinkingService.php b/Neos.Neos/Classes/Service/LinkingService.php index f834009891c..ef3cb117c29 100644 --- a/Neos.Neos/Classes/Service/LinkingService.php +++ b/Neos.Neos/Classes/Service/LinkingService.php @@ -17,7 +17,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateFinder; use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateProjection; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; @@ -234,8 +234,8 @@ public function convertUriToObject($uri, Node $contextNode = null) ); } return $this->contentRepositoryRegistry->subgraphForNode($contextNode) - ->findNodeByNodeAggregateIdentifier( - NodeAggregateIdentifier::fromString($matches[2]) + ->findNodeByNodeAggregateId( + NodeAggregateId::fromString($matches[2]) ); case 'asset': /** @var ?AssetInterface $asset */ @@ -311,18 +311,18 @@ public function createNodeUri( // if we get a node string, we need to assume it links to the current site $contentRepositoryIdentifier = SiteDetectionResult::fromRequest( $controllerContext->getRequest()->getHttpRequest() - )->contentRepositoryIdentifier; + )->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); $nodeAddress = NodeAddressFactory::create($contentRepository)->createFromUriString($node); $workspace = $contentRepository->getWorkspaceFinder()->findOneByName($nodeAddress->workspaceName); $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, $workspace && !$workspace->isPublicWorkspace() ? VisibilityConstraints::withoutRestrictions() : VisibilityConstraints::frontend() ); - $node = $subgraph->findNodeByNodeAggregateIdentifier($nodeAddress->nodeAggregateIdentifier); + $node = $subgraph->findNodeByNodeAggregateId($nodeAddress->nodeAggregateId); } catch (\Throwable $exception) { if ($baseNode === null) { throw new NeosException( @@ -331,7 +331,7 @@ public function createNodeUri( ); } $node = $this->contentRepositoryRegistry->subgraphForNode($baseNode) - ->findNodeByPath(NodePath::fromString($nodeString), $baseNode->nodeAggregateIdentifier); + ->findNodeByPath(NodePath::fromString($nodeString), $baseNode->nodeAggregateId); } if (!$node instanceof Node) { throw new NeosException(sprintf( @@ -352,17 +352,17 @@ public function createNodeUri( $this->lastLinkedNode = $node; $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); - $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamIdentifier( - $node->subgraphIdentity->contentStreamIdentifier + $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId( + $node->subgraphIdentity->contentStreamId ); $nodeHiddenStateFinder = $contentRepository->projectionState(NodeHiddenStateProjection::class); /* @var $nodeHiddenStateFinder NodeHiddenStateFinder */ $hiddenState = $nodeHiddenStateFinder->findHiddenState( - $node->subgraphIdentity->contentStreamIdentifier, + $node->subgraphIdentity->contentStreamId, $node->subgraphIdentity->dimensionSpacePoint, - $node->nodeAggregateIdentifier + $node->nodeAggregateId ); $request = $controllerContext->getRequest()->getMainRequest(); diff --git a/Neos.Neos/Classes/Service/Mapping/NodeReferenceConverter.php b/Neos.Neos/Classes/Service/Mapping/NodeReferenceConverter.php index 2f39dddef46..53220589d47 100644 --- a/Neos.Neos/Classes/Service/Mapping/NodeReferenceConverter.php +++ b/Neos.Neos/Classes/Service/Mapping/NodeReferenceConverter.php @@ -68,10 +68,10 @@ public function convertFrom( if (is_array($source)) { $result = []; foreach ($source as $node) { - $result[] = (string)$node->nodeAggregateIdentifier; + $result[] = (string)$node->nodeAggregateId; } } else { - $result = (string)$source->nodeAggregateIdentifier; + $result = (string)$source->nodeAggregateId; } return $result; diff --git a/Neos.Neos/Classes/Service/PluginService.php b/Neos.Neos/Classes/Service/PluginService.php index 9539eaf00c3..cc92a1cce92 100644 --- a/Neos.Neos/Classes/Service/PluginService.php +++ b/Neos.Neos/Classes/Service/PluginService.php @@ -15,7 +15,7 @@ namespace Neos\Neos\Service; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes; use Neos\ContentRepository\Core\NodeType\NodeType; @@ -65,7 +65,7 @@ class PluginService public function getPluginNodesWithViewDefinitions( WorkspaceName $workspaceName, DimensionSpacePoint $dimensionSpacePoint, - ContentRepositoryIdentifier $contentRepositoryIdentifier + ContentRepositoryId $contentRepositoryIdentifier ): Nodes { $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryIdentifier); @@ -76,7 +76,7 @@ public function getPluginNodesWithViewDefinitions( $siteNode = $this->siteNodeUtility->findCurrentSiteNode( $contentRepositoryIdentifier, - $workspace->currentContentStreamIdentifier, + $workspace->currentContentStreamId, $dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); @@ -102,7 +102,7 @@ protected function getNodes(Node $siteNode, NodeTypeNames $nodeTypeNames): Nodes { return $this->contentRepositoryRegistry->subgraphForNode($siteNode) ->findDescendants( - [$siteNode->nodeAggregateIdentifier], + [$siteNode->nodeAggregateId], NodeTypeConstraints::create($nodeTypeNames, NodeTypeNames::createEmpty()), null ); @@ -148,7 +148,7 @@ public function getPluginNodeByAction( string $actionName ): ?Node { $viewDefinition = $this->getPluginViewDefinitionByAction( - $currentNode->subgraphIdentity->contentRepositoryIdentifier, + $currentNode->subgraphIdentity->contentRepositoryId, $controllerObjectName, $actionName ); @@ -177,7 +177,7 @@ public function getPluginNodeByAction( * @throws Neos\Exception if more than one PluginView matches the given controller/action pair */ public function getPluginViewDefinitionByAction( - ContentRepositoryIdentifier $contentRepositoryIdentifier, + ContentRepositoryId $contentRepositoryIdentifier, $controllerObjectName, $actionName ): ?PluginViewDefinition { @@ -221,7 +221,7 @@ public function getPluginViewNodeByMasterPlugin(Node $node, string $viewName): ? ])) as $pluginViewNode ) { if ( - $pluginViewNode->getProperty('plugin') === (string)$node->nodeAggregateIdentifier + $pluginViewNode->getProperty('plugin') === (string)$node->nodeAggregateId && $pluginViewNode->getProperty('view') === $viewName ) { return $pluginViewNode; diff --git a/Neos.Neos/Classes/Service/View/NodeView.php b/Neos.Neos/Classes/Service/View/NodeView.php index 27771d13323..e79e669f041 100644 --- a/Neos.Neos/Classes/Service/View/NodeView.php +++ b/Neos.Neos/Classes/Service/View/NodeView.php @@ -107,7 +107,7 @@ public function assignNodes(Nodes $nodes): void $closestDocumentNode = $this->findClosestDocumentNode($node); if ($closestDocumentNode !== null) { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $data[] = [ @@ -120,7 +120,7 @@ public function assignNodes(Nodes $nodes): void 'You have a node that is no longer connected to a document node ancestor.' . ' Name: %s (Identifier: %s)', $node->nodeName, - $node->nodeAggregateIdentifier + $node->nodeAggregateId ), LogEnvironment::fromMethodName(__METHOD__)); } } @@ -138,7 +138,7 @@ private function findClosestDocumentNode(Node $node): ?Node if ($documentNode->nodeType->isOfType(NodeTypeNameFactory::NAME_DOCUMENT)) { return $documentNode; } - $documentNode = $subgraph->findParentNode($documentNode->nodeAggregateIdentifier); + $documentNode = $subgraph->findParentNode($documentNode->nodeAggregateId); } return null; @@ -261,14 +261,14 @@ protected function collectChildNodeData( ) { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeTypeConstraints = $nodeTypeFilter ? NodeTypeConstraints::fromFilterString($nodeTypeFilter) : null; - foreach ($subgraph->findChildNodes($node->nodeAggregateIdentifier, $nodeTypeConstraints) as $childNode) { + foreach ($subgraph->findChildNodes($node->nodeAggregateId, $nodeTypeConstraints) as $childNode) { if ( !$this->privilegeManager->isGranted( NodeTreePrivilege::class, @@ -284,8 +284,8 @@ protected function collectChildNodeData( $expand === false && $untilNode !== null && strpos( - (string)$subgraph->findNodePath($untilNode->nodeAggregateIdentifier), - (string)$subgraph->findNodePath($childNode->nodeAggregateIdentifier), + (string)$subgraph->findNodePath($untilNode->nodeAggregateId), + (string)$subgraph->findNodePath($childNode->nodeAggregateId), ) === 0 && $childNode !== $untilNode ) { @@ -320,7 +320,7 @@ protected function collectChildNodeData( case self::STYLE_TREE: $children = []; $grandChildNodes = $subgraph->findChildNodes( - $childNode->nodeAggregateIdentifier, + $childNode->nodeAggregateId, $nodeTypeConstraints ); $hasChildNodes = $grandChildNodes->count() > 0; @@ -350,11 +350,11 @@ protected function collectChildNodeData( public function collectParentNodeData(Node $rootNode, Nodes $nodes): array { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($rootNode); - $rootNodePath = (string)$subgraph->findNodePath($rootNode->nodeAggregateIdentifier); + $rootNodePath = (string)$subgraph->findNodePath($rootNode->nodeAggregateId); $nodeCollection = []; $addNode = function (Node $node, bool $matched) use ($subgraph, $rootNodePath, &$nodeCollection) { - $nodePath = (string)$subgraph->findNodePath($node->nodeAggregateIdentifier); + $nodePath = (string)$subgraph->findNodePath($node->nodeAggregateId); $path = str_replace('/', '.children.', substr($nodePath, strlen($rootNodePath) + 1)); if ($path !== '') { $nodeCollection = Arrays::setValueByPath($nodeCollection, $path . '.node', $node); @@ -365,7 +365,7 @@ public function collectParentNodeData(Node $rootNode, Nodes $nodes): array }; $findParent = function (Node $node) use ($subgraph, &$findParent, &$addNode) { - $parent = $subgraph->findParentNode($node->nodeAggregateIdentifier); + $parent = $subgraph->findParentNode($node->nodeAggregateId); if ($parent !== null) { if ( $this->privilegeManager->isGranted( @@ -429,16 +429,16 @@ public function collectTreeNodeData( bool $matched = false ): array { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeAddress = $nodeAddressFactory->createFromNode($node); $nodeHiddenStateFinder = $contentRepository->projectionState(NodeHiddenStateProjection::class); /* @var NodeHiddenStateFinder $nodeHiddenStateFinder */ $hiddenState = $nodeHiddenStateFinder->findHiddenState( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, - $nodeAddress->nodeAggregateIdentifier + $nodeAddress->nodeAggregateId ); $classes = []; diff --git a/Neos.Neos/Classes/TypeConverter/NodeConverter.php b/Neos.Neos/Classes/TypeConverter/NodeConverter.php index 8c3f7265d3d..b670db0f5df 100644 --- a/Neos.Neos/Classes/TypeConverter/NodeConverter.php +++ b/Neos.Neos/Classes/TypeConverter/NodeConverter.php @@ -66,7 +66,7 @@ public function convertFrom( PropertyMappingConfigurationInterface $configuration = null ) { $contentRepository = $this->contentRepositoryRegistry->get( - $source->subgraphIdentity->contentRepositoryIdentifier + $source->subgraphIdentity->contentRepositoryId ); return NodeAddressFactory::create($contentRepository)->createFromNode($source)->serializeForUri(); } diff --git a/Neos.Neos/Classes/View/FusionExceptionView.php b/Neos.Neos/Classes/View/FusionExceptionView.php index 7bb720aa716..188aa8fc3d8 100644 --- a/Neos.Neos/Classes/View/FusionExceptionView.php +++ b/Neos.Neos/Classes/View/FusionExceptionView.php @@ -17,7 +17,7 @@ use GuzzleHttp\Psr7\ServerRequest; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Annotations as Flow; @@ -93,20 +93,20 @@ public function render() : ServerRequest::fromGlobals(); $siteDetectionResult = SiteDetectionResult::fromRequest($httpRequest); - $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryIdentifier); + $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryId); $fusionExceptionViewInternals = $this->contentRepositoryRegistry->getService( - $siteDetectionResult->contentRepositoryIdentifier, + $siteDetectionResult->contentRepositoryId, new FusionExceptionViewInternalsFactory() ); $dimensionSpacePoint = $fusionExceptionViewInternals->getArbitraryDimensionSpacePoint(); $contentStreamIdentifier = $contentRepository->getWorkspaceFinder()->findOneByName(WorkspaceName::forLive()) - ?->currentContentStreamIdentifier; + ?->currentContentStreamId; $currentSiteNode = null; - if ($contentStreamIdentifier instanceof ContentStreamIdentifier) { + if ($contentStreamIdentifier instanceof ContentStreamId) { $currentSiteNode = $this->siteNodeUtility->findCurrentSiteNode( - $siteDetectionResult->contentRepositoryIdentifier, + $siteDetectionResult->contentRepositoryId, $contentStreamIdentifier, $dimensionSpacePoint, VisibilityConstraints::frontend() diff --git a/Neos.Neos/Classes/View/FusionView.php b/Neos.Neos/Classes/View/FusionView.php index cd3ec0ba8a5..17c666f6f02 100644 --- a/Neos.Neos/Classes/View/FusionView.php +++ b/Neos.Neos/Classes/View/FusionView.php @@ -178,7 +178,7 @@ protected function getClosestDocumentNode(Node $node): ?Node { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); while ($node !== null && !$node->nodeType->isOfType('Neos.Neos:Document')) { - $node = $subgraph->findParentNode($node->nodeAggregateIdentifier); + $node = $subgraph->findParentNode($node->nodeAggregateId); } return $node; diff --git a/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php b/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php index 98dc854a9b5..6505fe97b78 100644 --- a/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php +++ b/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php @@ -53,7 +53,7 @@ public function render(): mixed if ($currentNode->nodeType->isOfType('Neos.Neos:Document')) { $documentNodes[] = $currentNode; } - $currentNode = $subgraph->findParentNode($currentNode->nodeAggregateIdentifier); + $currentNode = $subgraph->findParentNode($currentNode->nodeAggregateId); } $documentNodes = array_reverse($documentNodes); $this->templateVariableContainer->add('documentNodes', $documentNodes); diff --git a/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php b/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php index 076b7c74f6a..286bb6503a6 100644 --- a/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php +++ b/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\Neos\FrontendRouting\NodeAddressFactory; @@ -262,7 +262,7 @@ public function render(): string if ($node instanceof Node) { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeAddress = $nodeAddressFactory->createFromNode($node); @@ -270,7 +270,7 @@ public function render(): string $documentNode = $this->getContextVariable('documentNode'); assert($documentNode instanceof Node); $contentRepository = $this->contentRepositoryRegistry->get( - $documentNode->subgraphIdentity->contentRepositoryIdentifier + $documentNode->subgraphIdentity->contentRepositoryId ); $nodeAddress = $this->resolveNodeAddressFromString($node, $documentNode, $contentRepository); $node = $documentNode; @@ -285,16 +285,16 @@ public function render(): string $subgraph = $contentRepository->getContentGraph() ->getSubgraph( - $nodeAddress->contentStreamIdentifier, + $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, $node->subgraphIdentity->visibilityConstraints ); - $resolvedNode = $subgraph->findNodeByNodeAggregateIdentifier($nodeAddress->nodeAggregateIdentifier); + $resolvedNode = $subgraph->findNodeByNodeAggregateId($nodeAddress->nodeAggregateId); if ($resolvedNode === null) { $this->throwableStorage->logThrowable(new ViewHelperException(sprintf( 'Failed to resolve node "%s" on subgraph "%s"', - $nodeAddress->nodeAggregateIdentifier, + $nodeAddress->nodeAggregateId, json_encode($subgraph, JSON_PARTIAL_OUTPUT_ON_ERROR) ), 1601372444)); } @@ -306,12 +306,12 @@ public function render(): string ); if ($shortcutNodeAddress instanceof NodeAddress) { $resolvedNode = $subgraph - ->findNodeByNodeAggregateIdentifier($shortcutNodeAddress->nodeAggregateIdentifier); + ->findNodeByNodeAggregateId($shortcutNodeAddress->nodeAggregateId); } } catch (NodeNotFoundException | InvalidShortcutException $e) { $this->throwableStorage->logThrowable(new ViewHelperException(sprintf( 'Failed to resolve shortcut node "%s" on subgraph "%s"', - $resolvedNode->nodeAggregateIdentifier, + $resolvedNode->nodeAggregateId, json_encode($subgraph, JSON_PARTIAL_OUTPUT_ON_ERROR) ), 1601370239, $e)); } @@ -372,12 +372,12 @@ private function resolveNodeAddressFromString( $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $documentNodeAddress = $nodeAddressFactory->createFromNode($documentNode); if (strncmp($path, 'node://', 7) === 0) { - return $documentNodeAddress->withNodeAggregateIdentifier( - NodeAggregateIdentifier::fromString(\mb_substr($path, 7)) + return $documentNodeAddress->withNodeAggregateId( + NodeAggregateId::fromString(\mb_substr($path, 7)) ); } $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $documentNodeAddress->contentStreamIdentifier, + $documentNodeAddress->contentStreamId, $documentNodeAddress->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); @@ -386,12 +386,12 @@ private function resolveNodeAddressFromString( // once https://github.com/neos/contentrepository-development-collection/issues/164 is resolved $siteNode = $this->nodeSiteResolvingService->findSiteNodeForNodeAddress( $documentNodeAddress, - $documentNode->subgraphIdentity->contentRepositoryIdentifier + $documentNode->subgraphIdentity->contentRepositoryId ); if ($siteNode === null) { throw new ViewHelperException(sprintf( 'Failed to determine site node for aggregate node "%s" and subgraph "%s"', - $documentNodeAddress->nodeAggregateIdentifier, + $documentNodeAddress->nodeAggregateId, json_encode($subgraph, JSON_PARTIAL_OUTPUT_ON_ERROR) ), 1601366598); } @@ -400,23 +400,23 @@ private function resolveNodeAddressFromString( } else { $targetNode = $subgraph->findNodeByPath( NodePath::fromString(substr($path, 1)), - $siteNode->nodeAggregateIdentifier + $siteNode->nodeAggregateId ); } } else { $targetNode = $subgraph->findNodeByPath( NodePath::fromString($path), - $documentNode->nodeAggregateIdentifier + $documentNode->nodeAggregateId ); } if ($targetNode === null) { throw new ViewHelperException(sprintf( 'Node on path "%s" could not be found for aggregate node "%s" and subgraph "%s"', $path, - $documentNodeAddress->nodeAggregateIdentifier, + $documentNodeAddress->nodeAggregateId, json_encode($subgraph, JSON_PARTIAL_OUTPUT_ON_ERROR) ), 1601311789); } - return $documentNodeAddress->withNodeAggregateIdentifier($targetNode->nodeAggregateIdentifier); + return $documentNodeAddress->withNodeAggregateId($targetNode->nodeAggregateId); } } diff --git a/Neos.Neos/Classes/ViewHelpers/Rendering/AbstractRenderingStateViewHelper.php b/Neos.Neos/Classes/ViewHelpers/Rendering/AbstractRenderingStateViewHelper.php index d2844fcbe81..b16d738b05a 100644 --- a/Neos.Neos/Classes/ViewHelpers/Rendering/AbstractRenderingStateViewHelper.php +++ b/Neos.Neos/Classes/ViewHelpers/Rendering/AbstractRenderingStateViewHelper.php @@ -56,7 +56,7 @@ protected function getNodeAddressOfContextNode(?Node $node): NodeAddress { if ($node !== null) { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); return NodeAddressFactory::create($contentRepository)->createFromNode($node); } diff --git a/Neos.Neos/Classes/ViewHelpers/Uri/NodeViewHelper.php b/Neos.Neos/Classes/ViewHelpers/Uri/NodeViewHelper.php index 728e098d512..f587bcfa931 100644 --- a/Neos.Neos/Classes/ViewHelpers/Uri/NodeViewHelper.php +++ b/Neos.Neos/Classes/ViewHelpers/Uri/NodeViewHelper.php @@ -16,7 +16,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\Neos\FrontendRouting\NodeAddressFactory; @@ -214,7 +214,7 @@ public function render(): string if ($node instanceof Node) { $contentRepository = $this->contentRepositoryRegistry->get( - $node->subgraphIdentity->contentRepositoryIdentifier + $node->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $nodeAddress = $nodeAddressFactory->createFromNode($node); @@ -270,17 +270,17 @@ private function resolveNodeAddressFromString(string $path): ?NodeAddress /* @var Node $documentNode */ $documentNode = $this->getContextVariable('documentNode'); $contentRepository = $this->contentRepositoryRegistry->get( - $documentNode->subgraphIdentity->contentRepositoryIdentifier + $documentNode->subgraphIdentity->contentRepositoryId ); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); $documentNodeAddress = $nodeAddressFactory->createFromNode($documentNode); if (strncmp($path, 'node://', 7) === 0) { - return $documentNodeAddress->withNodeAggregateIdentifier( - NodeAggregateIdentifier::fromString(\mb_substr($path, 7)) + return $documentNodeAddress->withNodeAggregateId( + NodeAggregateId::fromString(\mb_substr($path, 7)) ); } $subgraph = $contentRepository->getContentGraph()->getSubgraph( - $documentNodeAddress->contentStreamIdentifier, + $documentNodeAddress->contentStreamId, $documentNodeAddress->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); @@ -289,12 +289,12 @@ private function resolveNodeAddressFromString(string $path): ?NodeAddress // once https://github.com/neos/contentrepository-development-collection/issues/164 is resolved $siteNode = $this->nodeSiteResolvingService->findSiteNodeForNodeAddress( $documentNodeAddress, - $documentNode->subgraphIdentity->contentRepositoryIdentifier + $documentNode->subgraphIdentity->contentRepositoryId ); if ($siteNode === null) { throw new ViewHelperException(sprintf( 'Failed to determine site node for aggregate node "%s" and subgraph "%s"', - $documentNodeAddress->nodeAggregateIdentifier, + $documentNodeAddress->nodeAggregateId, json_encode($subgraph, JSON_PARTIAL_OUTPUT_ON_ERROR) ), 1601366598); } @@ -303,24 +303,24 @@ private function resolveNodeAddressFromString(string $path): ?NodeAddress } else { $targetNode = $subgraph->findNodeByPath( NodePath::fromString(substr($path, 1)), - $siteNode->nodeAggregateIdentifier + $siteNode->nodeAggregateId ); } } else { $targetNode = $subgraph->findNodeByPath( NodePath::fromString($path), - $documentNode->nodeAggregateIdentifier + $documentNode->nodeAggregateId ); } if ($targetNode === null) { $this->throwableStorage->logThrowable(new ViewHelperException(sprintf( 'Node on path "%s" could not be found for aggregate node "%s" and subgraph "%s"', $path, - $documentNodeAddress->nodeAggregateIdentifier, + $documentNodeAddress->nodeAggregateId, json_encode($subgraph, JSON_PARTIAL_OUTPUT_ON_ERROR) ), 1601311789)); return null; } - return $documentNodeAddress->withNodeAggregateIdentifier($targetNode->nodeAggregateIdentifier); + return $documentNodeAddress->withNodeAggregateId($targetNode->nodeAggregateId); } } diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FlowQueryTrait.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FlowQueryTrait.php index 1c6081e5b00..f81f59b5746 100644 --- a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FlowQueryTrait.php +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FlowQueryTrait.php @@ -13,9 +13,9 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\NodeAccess\FlowQueryOperations\FindOperation; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Tests\Behavior\Features\Helper\ContentGraphs; use Neos\Eel\FlowQuery\FlowQuery; use PHPUnit\Framework\Assert; @@ -36,9 +36,9 @@ trait FlowQueryTrait private $readModelFactory; /** - * @var ContentStreamIdentifier + * @var ContentStreamId */ - private ?ContentStreamIdentifier $contentStreamIdentifier = null; + private ?ContentStreamId $contentStreamIdentifier = null; /** * @var DimensionSpacePoint @@ -55,12 +55,12 @@ abstract protected function getAvailableContentGraphs(): ContentGraphs; public function iHaveAFlowQueryWithNode(string $serializedNodeAggregateIdentifier) { $subgraph = $this->contentGraph->getSubgraph( - $this->contentStreamIdentifier, + $this->contentStreamId, $this->dimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); - $nodeAggregateIdentifier = NodeAggregateIdentifier::fromString($serializedNodeAggregateIdentifier); - $node = $subgraph->findNodeByNodeAggregateIdentifier($nodeAggregateIdentifier); + $nodeAggregateIdentifier = NodeAggregateId::fromString($serializedNodeAggregateIdentifier); + $node = $subgraph->findNodeByNodeAggregateId($nodeAggregateIdentifier); $this->currentFlowQuery = new FlowQuery([$node]); } @@ -90,11 +90,11 @@ public function iCallFlowQueryOperationWithArgument(string $operationName, strin */ public function iExpectANodeIdentifiedByAggregateIdentifierToExistInTheFlowQueryContext(string $serializedExpectedNodeAggregateIdentifier) { - $expectedNodeAggregateIdentifier = NodeAggregateIdentifier::fromString($serializedExpectedNodeAggregateIdentifier); + $expectedNodeAggregateIdentifier = NodeAggregateId::fromString($serializedExpectedNodeAggregateIdentifier); $expectationMet = false; foreach ($this->currentFlowQuery->getContext() as $node) { /** @var \Neos\ContentRepository\Core\Projection\ContentGraph\Node $node */ - if ($node->nodeAggregateIdentifier->equals($expectedNodeAggregateIdentifier)) { + if ($node->nodeAggregateId->equals($expectedNodeAggregateIdentifier)) { $expectationMet = true; break; } diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/RoutingTrait.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/RoutingTrait.php index 16568228327..6a96b3a9ff9 100644 --- a/Neos.Neos/Tests/Behavior/Features/Bootstrap/RoutingTrait.php +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/RoutingTrait.php @@ -19,11 +19,11 @@ use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\Neos\FrontendRouting\NodeAddressFactory; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\Flow\Http\ServerRequestAttributes; use Neos\Flow\Mvc\ActionRequest; @@ -73,7 +73,7 @@ trait RoutingTrait */ abstract protected function getObjectManager(); - abstract protected function getContentRepositoryIdentifier(): ContentRepositoryIdentifier; + abstract protected function getContentRepositoryId(): ContentRepositoryId; /** * @Given A site exists for node name :nodeName @@ -192,8 +192,8 @@ public function theMatchedNodeShouldBeInContentStreamAndOriginDimension(string $ $nodeAddress = $this->match($this->requestUrl); Assert::assertNotNull($nodeAddress, 'Routing result does not have "node" key - this probably means that the FrontendNodeRoutePartHandler did not properly resolve the result.'); Assert::assertTrue($nodeAddress->isInLiveWorkspace()); - Assert::assertSame($nodeAggregateIdentifier, (string)$nodeAddress->nodeAggregateIdentifier); - Assert::assertSame($contentStreamIdentifier, (string)$nodeAddress->contentStreamIdentifier); + Assert::assertSame($nodeAggregateIdentifier, (string)$nodeAddress->nodeAggregateId); + Assert::assertSame($contentStreamIdentifier, (string)$nodeAddress->contentStreamId); Assert::assertSame( DimensionSpacePoint::fromJsonString($dimensionSpacePoint), $nodeAddress->dimensionSpacePoint, @@ -273,7 +273,7 @@ public function tableContainsExactly(TableNode $expectedRows): void $dbal = $this->getObjectManager()->get(EntityManagerInterface::class)->getConnection(); $columns = implode(', ', array_keys($expectedRows->getHash()[0])); $tablePrefix = DocumentUriPathProjectionFactory::projectionTableNamePrefix( - $this->getContentRepositoryIdentifier() + $this->getContentRepositoryId() ); $actualResult = $dbal->fetchAll('SELECT ' . $columns . ' FROM ' . $tablePrefix . '_uri ORDER BY nodeaggregateidentifierpath'); $expectedResult = array_map(static function (array $row) { @@ -291,9 +291,9 @@ private function resolveUrl(string $nodeAggregateIdentifier, string $contentStre } putenv('FLOW_REWRITEURLS=1'); $nodeAddress = new NodeAddress( - ContentStreamIdentifier::fromString($contentStreamIdentifier), + ContentStreamId::fromString($contentStreamIdentifier), DimensionSpacePoint::fromJsonString($dimensionSpacePoint), - NodeAggregateIdentifier::fromString($nodeAggregateIdentifier), + NodeAggregateId::fromString($nodeAggregateIdentifier), WorkspaceName::forLive() ); $httpRequest = $this->objectManager->get(ServerRequestFactoryInterface::class)->createServerRequest('GET', $this->requestUrl); @@ -320,9 +320,9 @@ public function iInvokeTheDimensionResolverWithOptions(string $factoryClassName, $dimensionResolverFactory = $this->getObjectManager()->get($factoryClassName); assert($dimensionResolverFactory instanceof DimensionResolverFactoryInterface); $resolverOptions = Yaml::parse($resolverOptionsYaml->getRaw()) ?? []; - $dimensionResolver = $dimensionResolverFactory->create(ContentRepositoryIdentifier::fromString('default'), $resolverOptions); + $dimensionResolver = $dimensionResolverFactory->create(ContentRepositoryId::fromString('default'), $resolverOptions); - $siteDetectionResult = SiteDetectionResult::create(SiteNodeName::fromString("site-node"), ContentRepositoryIdentifier::fromString("default")); + $siteDetectionResult = SiteDetectionResult::create(SiteNodeName::fromString("site-node"), ContentRepositoryId::fromString("default")); $routeParameters = $siteDetectionResult->storeInRouteParameters(RouteParameters::createEmpty()); $dimensionResolverContext = RequestToDimensionSpacePointContext::fromUriPathAndRouteParameters($this->requestUrl->getPath(), $routeParameters); diff --git a/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php b/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php index bdae1314119..6905f7c8031 100644 --- a/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php +++ b/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php @@ -12,17 +12,17 @@ */ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\Factory\ContentRepositoryIdentifier; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\PropertyCollectionInterface; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\NodeType\NodeType; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamIdentifier; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\Fusion\Tests\Functional\FusionObjects\AbstractFusionObjectTest; use PHPUnit\Framework\MockObject\MockObject; @@ -150,12 +150,12 @@ protected function setUp(): void $this->textNode = new Node( ContentSubgraphIdentity::create( - ContentRepositoryIdentifier::fromString("cr"), - ContentStreamIdentifier::fromString("cs"), + ContentRepositoryId::fromString("cr"), + ContentStreamId::fromString("cs"), DimensionSpacePoint::fromArray([]), VisibilityConstraints::withoutRestrictions() ), - NodeAggregateIdentifier::fromString("na"), + NodeAggregateId::fromString("na"), OriginDimensionSpacePoint::fromArray([]), NodeAggregateClassification::CLASSIFICATION_REGULAR, NodeTypeName::fromString("nt"),