diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php index e7b6ca3ab2a..929ed6b555d 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamCreation/Command/CreateContentStream.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; -use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * CreateContentStream for creating the FIRST content stream. @@ -28,7 +27,6 @@ final class CreateContentStream implements CommandInterface { public function __construct( public readonly ContentStreamId $contentStreamId, - public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php index fe1ab386a04..b96ef0b6af4 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamForking/Command/ForkContentStream.php @@ -33,7 +33,6 @@ public function __construct( */ public readonly ContentStreamId $newContentStreamId, public readonly ContentStreamId $sourceContentStreamId, - public readonly UserId $initiatingUserId ) { } @@ -46,7 +45,6 @@ public static function fromArray(array $array): self return new self( ContentStreamId::fromString($array['contentStreamId']), ContentStreamId::fromString($array['sourceContentStreamId']), - UserId::fromString($array['initiatingUserId']) ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php index b07c89174eb..832ebac0ba0 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php +++ b/Neos.ContentRepository.Core/Classes/Feature/ContentStreamRemoval/Command/RemoveContentStream.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; -use Neos\ContentRepository\Core\SharedModel\User\UserId; /** * Command to remove an existing content stream @@ -27,7 +26,6 @@ final class RemoveContentStream implements CommandInterface { public function __construct( public readonly ContentStreamId $contentStreamId, - public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php index 20270665ee7..8882cad1969 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNode.php @@ -15,14 +15,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; +use Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite; +use Neos\ContentRepository\Core\NodeType\NodeTypeName; 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\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * CreateNodeAggregateWithNode @@ -73,7 +72,6 @@ public function __construct( * from the configured specializations. */ public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, - public readonly UserId $initiatingUserId, public readonly NodeAggregateId $parentNodeAggregateId, ?NodeAggregateId $succeedingSiblingNodeAggregateId = null, ?NodeName $nodeName = null, @@ -94,7 +92,6 @@ public function withInitialPropertyValues(PropertyValuesToWrite $newInitialPrope $this->nodeAggregateId, $this->nodeTypeName, $this->originDimensionSpacePoint, - $this->initiatingUserId, $this->parentNodeAggregateId, $this->succeedingSiblingNodeAggregateId, $this->nodeName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php index 0155606a937..cf88f165d2a 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/Command/CreateNodeAggregateWithNodeAndSerializedProperties.php @@ -15,17 +15,16 @@ namespace Neos\ContentRepository\Core\Feature\NodeCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; +use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; 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\ContentStreamId; +use Neos\ContentRepository\Core\NodeType\NodeTypeName; 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\MatchableWithNodeIdToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; -use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * The properties of {@see CreateNodeAggregateWithNode} are directly serialized; and then this command @@ -75,7 +74,6 @@ public function __construct( * from the configured specializations. */ public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, - public readonly UserId $initiatingUserId, public readonly NodeAggregateId $parentNodeAggregateId, ?NodeAggregateId $succeedingSiblingNodeAggregateId = null, ?NodeName $nodeName = null, @@ -99,7 +97,6 @@ public static function fromArray(array $array): self NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['nodeTypeName']), OriginDimensionSpacePoint::fromArray($array['originDimensionSpacePoint']), - UserId::fromString($array['initiatingUserId']), NodeAggregateId::fromString($array['parentNodeAggregateId']), isset($array['succeedingSiblingNodeAggregateId']) ? NodeAggregateId::fromString($array['succeedingSiblingNodeAggregateId']) @@ -131,7 +128,6 @@ public function withTetheredDescendantNodeAggregateIds( $this->nodeAggregateId, $this->nodeTypeName, $this->originDimensionSpacePoint, - $this->initiatingUserId, $this->parentNodeAggregateId, $this->succeedingSiblingNodeAggregateId, $this->nodeName, @@ -145,18 +141,7 @@ public function withTetheredDescendantNodeAggregateIds( */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'nodeTypeName' => $this->nodeTypeName, - 'originDimensionSpacePoint' => $this->originDimensionSpacePoint, - 'initiatingUserId' => $this->initiatingUserId, - 'parentNodeAggregateId' => $this->parentNodeAggregateId, - 'succeedingSiblingNodeAggregateId' => $this->succeedingSiblingNodeAggregateId, - 'nodeName' => $this->nodeName, - 'initialPropertyValues' => $this->initialPropertyValues, - 'tetheredDescendantNodeAggregateIds' => $this->tetheredDescendantNodeAggregateIds - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -166,7 +151,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->nodeAggregateId, $this->nodeTypeName, $this->originDimensionSpacePoint, - $this->initiatingUserId, $this->parentNodeAggregateId, $this->succeedingSiblingNodeAggregateId, $this->nodeName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php index baf398fddca..1aa895f1aab 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/DisableNodeAggregate.php @@ -16,13 +16,12 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; 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\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 @@ -42,7 +41,6 @@ public function __construct( public readonly DimensionSpacePoint $coveredDimensionSpacePoint, /** The strategy the user chose to determine which specialization variants will also be disabled */ public readonly NodeVariantSelectionStrategy $nodeVariantSelectionStrategy, - public readonly UserId $initiatingUserId ) { } @@ -56,7 +54,6 @@ public static function fromArray(array $array): self NodeAggregateId::fromString($array['nodeAggregateId']), DimensionSpacePoint::fromArray($array['coveredDimensionSpacePoint']), NodeVariantSelectionStrategy::from($array['nodeVariantSelectionStrategy']), - UserId::fromString($array['initiatingUserId']) ); } @@ -65,13 +62,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'coveredDimensionSpacePoint' => $this->coveredDimensionSpacePoint, - 'nodeVariantSelectionStrategy' => $this->nodeVariantSelectionStrategy, - 'initiatingUserId' => $this->initiatingUserId - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -81,7 +72,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->nodeAggregateId, $this->coveredDimensionSpacePoint, $this->nodeVariantSelectionStrategy, - $this->initiatingUserId ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php index 2e3067a5c77..ca7a11e71f9 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDisabling/Command/EnableNodeAggregate.php @@ -17,12 +17,11 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; 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\UserId; /** * Enable the given node aggregate in the given content stream in a dimension space point using a given strategy @@ -42,7 +41,6 @@ public function __construct( public readonly DimensionSpacePoint $coveredDimensionSpacePoint, /** The strategy the user chose to determine which specialization variants will also be disabled */ public readonly NodeVariantSelectionStrategy $nodeVariantSelectionStrategy, - public readonly UserId $initiatingUserId ) { } @@ -56,7 +54,6 @@ public static function fromArray(array $array): self NodeAggregateId::fromString($array['nodeAggregateId']), DimensionSpacePoint::fromArray($array['coveredDimensionSpacePoint']), NodeVariantSelectionStrategy::from($array['nodeVariantSelectionStrategy']), - UserId::fromString($array['initiatingUserId']) ); } @@ -65,13 +62,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'coveredDimensionSpacePoint' => $this->coveredDimensionSpacePoint, - 'nodeVariantSelectionStrategy' => $this->nodeVariantSelectionStrategy, - 'initiatingUserId' => $this->initiatingUserId - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -81,7 +72,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->nodeAggregateId, $this->coveredDimensionSpacePoint, $this->nodeVariantSelectionStrategy, - $this->initiatingUserId ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php index 913f6fd72ae..2102ca61d22 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Command/CopyNodesRecursively.php @@ -15,18 +15,17 @@ namespace Neos\ContentRepository\Core\Feature\NodeDuplication\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeAggregateIdMapping; use Neos\ContentRepository\Core\Feature\NodeDuplication\Dto\NodeSubtreeSnapshot; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; -use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -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\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; -use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * CopyNodesRecursively command @@ -62,7 +61,6 @@ private function __construct( * @var OriginDimensionSpacePoint */ public readonly OriginDimensionSpacePoint $targetDimensionSpacePoint, - public readonly UserId $initiatingUserId, /** * Node aggregate id of the target node's parent (optional) * @@ -96,7 +94,6 @@ public static function createFromSubgraphAndStartNode( ContentSubgraphInterface $subgraph, Node $startNode, OriginDimensionSpacePoint $dimensionSpacePoint, - UserId $initiatingUserId, NodeAggregateId $targetParentNodeAggregateId, ?NodeAggregateId $targetSucceedingSiblingNodeAggregateId, ?NodeName $targetNodeName @@ -107,7 +104,6 @@ public static function createFromSubgraphAndStartNode( $startNode->subgraphIdentity->contentStreamId, $nodeSubtreeSnapshot, $dimensionSpacePoint, - $initiatingUserId, $targetParentNodeAggregateId, $targetSucceedingSiblingNodeAggregateId, $targetNodeName, @@ -124,7 +120,6 @@ public static function fromArray(array $array): self ContentStreamId::fromString($array['contentStreamId']), NodeSubtreeSnapshot::fromArray($array['nodeTreeToInsert']), OriginDimensionSpacePoint::fromArray($array['targetDimensionSpacePoint']), - UserId::fromString($array['initiatingUserId']), NodeAggregateId::fromString($array['targetParentNodeAggregateId']), isset($array['targetSucceedingSiblingNodeAggregateId']) ? NodeAggregateId::fromString($array['targetSucceedingSiblingNodeAggregateId']) @@ -139,16 +134,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeTreeToInsert' => $this->nodeTreeToInsert, - 'targetDimensionSpacePoint' => $this->targetDimensionSpacePoint, - 'initiatingUserId' => $this->initiatingUserId, - 'targetParentNodeAggregateId' => $this->targetParentNodeAggregateId, - 'targetSucceedingSiblingNodeAggregateId' => $this->targetSucceedingSiblingNodeAggregateId, - 'targetNodeName' => $this->targetNodeName, - 'nodeAggregateIdMapping' => $this->nodeAggregateIdMapping, - ]; + return get_object_vars($this); } public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool @@ -170,7 +156,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $target, $this->nodeTreeToInsert, $this->targetDimensionSpacePoint, - $this->initiatingUserId, $this->targetParentNodeAggregateId, $this->targetSucceedingSiblingNodeAggregateId, $this->targetNodeName, @@ -185,7 +170,6 @@ public function withNodeAggregateIdMapping( $this->contentStreamId, $this->nodeTreeToInsert, $this->targetDimensionSpacePoint, - $this->initiatingUserId, $this->targetParentNodeAggregateId, $this->targetSucceedingSiblingNodeAggregateId, $this->targetNodeName, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php index ef8b5c925b6..16a7dfaa8db 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php @@ -15,12 +15,10 @@ namespace Neos\ContentRepository\Core\Feature\NodeModification\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -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\UserId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Set property values for a given node. @@ -40,7 +38,6 @@ public function __construct( public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, public readonly PropertyValuesToWrite $propertyValues, - public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php index 981f89717d3..7f541669409 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetSerializedNodeProperties.php @@ -15,14 +15,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeModification\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; -use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -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\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Set property values for a given node (internal implementation). @@ -42,7 +41,6 @@ public function __construct( public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $originDimensionSpacePoint, public readonly SerializedPropertyValues $propertyValues, - public readonly UserId $initiatingUserId ) { } @@ -56,7 +54,6 @@ public static function fromArray(array $array): self NodeAggregateId::fromString($array['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($array['originDimensionSpacePoint']), SerializedPropertyValues::fromArray($array['propertyValues']), - UserId::fromString($array['initiatingUserId']) ); } @@ -66,13 +63,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'originDimensionSpacePoint' => $this->originDimensionSpacePoint, - 'propertyValues' => $this->propertyValues, - 'initiatingUserId' => $this->initiatingUserId - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -82,7 +73,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->nodeAggregateId, $this->originDimensionSpacePoint, $this->propertyValues, - $this->initiatingUserId ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php index a1d5c5bcea2..4c3418800be 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php @@ -15,14 +15,13 @@ namespace Neos\ContentRepository\Core\Feature\NodeMove\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; -use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\NodeMove\Dto\RelationDistributionStrategy; -use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * The "Move node aggregate" command @@ -88,7 +87,6 @@ public function __construct( * The relation distribution strategy to be used */ public readonly RelationDistributionStrategy $relationDistributionStrategy, - public readonly UserId $initiatingUserId ) { } @@ -111,7 +109,6 @@ public static function fromArray(array $array): self ? NodeAggregateId::fromString($array['newSucceedingSiblingNodeAggregateId']) : null, RelationDistributionStrategy::fromString($array['relationDistributionStrategy']), - UserId::fromString($array['initiatingUserId']) ); } @@ -120,16 +117,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'dimensionSpacePoint' => $this->dimensionSpacePoint, - 'nodeAggregateId' => $this->nodeAggregateId, - 'newParentNodeAggregateId' => $this->newParentNodeAggregateId, - 'newPrecedingSiblingNodeAggregateId' => $this->newPrecedingSiblingNodeAggregateId, - 'newSucceedingSiblingNodeAggregateId' => $this->newSucceedingSiblingNodeAggregateId, - 'relationDistributionStrategy' => $this->relationDistributionStrategy, - 'initiatingUserId' => $this->initiatingUserId - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -142,7 +130,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->newPrecedingSiblingNodeAggregateId, $this->newSucceedingSiblingNodeAggregateId, $this->relationDistributionStrategy, - $this->initiatingUserId ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php index df38e34b2be..4d3b0561070 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetNodeReferences.php @@ -5,12 +5,11 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\NodeReferencesToWrite; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\ReferenceName; 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\UserId; /** * Create a named reference from source to destination node @@ -25,7 +24,6 @@ public function __construct( public readonly OriginDimensionSpacePoint $sourceOriginDimensionSpacePoint, public readonly ReferenceName $referenceName, public readonly NodeReferencesToWrite $references, - public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php index 19b7e4a3b06..b711b9bd30d 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeReferencing/Command/SetSerializedNodeReferences.php @@ -15,15 +15,14 @@ namespace Neos\ContentRepository\Core\Feature\NodeReferencing\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\SerializedNodeReferences; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\ReferenceName; -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; /** * Set property values for a given node (internal implementation). @@ -44,7 +43,6 @@ public function __construct( public readonly OriginDimensionSpacePoint $sourceOriginDimensionSpacePoint, public readonly ReferenceName $referenceName, public readonly SerializedNodeReferences $references, - public readonly UserId $initiatingUserId ) { } @@ -59,7 +57,6 @@ public static function fromArray(array $array): self OriginDimensionSpacePoint::fromArray($array['sourceOriginDimensionSpacePoint']), ReferenceName::fromString($array['referenceName']), SerializedNodeReferences::fromArray($array['references']), - UserId::fromString($array['initiatingUserId']) ); } @@ -69,14 +66,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'sourceNodeAggregateId' => $this->sourceNodeAggregateId, - 'sourceOriginDimensionSpacePoint' => $this->sourceOriginDimensionSpacePoint, - 'referenceName' => $this->referenceName, - 'references' => $this->references, - 'initiatingUserId' => $this->initiatingUserId - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -87,7 +77,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->sourceOriginDimensionSpacePoint, $this->referenceName, $this->references, - $this->initiatingUserId ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php index 72b2114f308..b1540c02434 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRemoval/Command/RemoveNodeAggregate.php @@ -17,12 +17,11 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; 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\UserId; /** * @api commands are the write-API of the ContentRepository @@ -39,7 +38,6 @@ public function __construct( /** 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 UserId $initiatingUserId, /** * 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: @@ -67,7 +65,6 @@ public static function fromArray(array $array): self NodeAggregateId::fromString($array['nodeAggregateId']), DimensionSpacePoint::fromArray($array['coveredDimensionSpacePoint']), NodeVariantSelectionStrategy::from($array['nodeVariantSelectionStrategy']), - UserId::fromString($array['initiatingUserId']), isset($array['removalAttachmentPoint']) ? NodeAggregateId::fromString($array['removalAttachmentPoint']) : null @@ -79,14 +76,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'coveredDimensionSpacePoint' => $this->coveredDimensionSpacePoint, - 'nodeVariantSelectionStrategy' => $this->nodeVariantSelectionStrategy, - 'initiatingUserId' => $this->initiatingUserId, - 'removalAttachmentPoint' => $this->removalAttachmentPoint - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -96,7 +86,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->nodeAggregateId, $this->coveredDimensionSpacePoint, $this->nodeVariantSelectionStrategy, - $this->initiatingUserId, $this->removalAttachmentPoint ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php index bfd41a27ace..23d611a47af 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/Command/ChangeNodeAggregateName.php @@ -15,13 +15,12 @@ namespace Neos\ContentRepository\Core\Feature\NodeRenaming\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; +use Neos\ContentRepository\Core\Feature\Common\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; 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\MatchableWithNodeIdToPublishOrDiscardInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * All variants in a NodeAggregate have the same NodeName - and this can be changed here. @@ -40,7 +39,6 @@ public function __construct( public readonly ContentStreamId $contentStreamId, public readonly NodeAggregateId $nodeAggregateId, public readonly NodeName $newNodeName, - public readonly UserId $initiatingUserId ) { } @@ -53,7 +51,6 @@ public static function fromArray(array $array): self ContentStreamId::fromString($array['contentStreamId']), NodeAggregateId::fromString($array['nodeAggregateId']), NodeName::fromString($array['newNodeName']), - UserId::fromString($array['initiatingUserId']) ); } @@ -62,12 +59,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'newNodeName' => $this->newNodeName, - 'initiatingUserId' => $this->initiatingUserId - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -76,7 +68,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $target, $this->nodeAggregateId, $this->newNodeName, - $this->initiatingUserId ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php index ea9b9c74bfa..eab3b53fbeb 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/Command/ChangeNodeAggregateType.php @@ -15,17 +15,18 @@ namespace Neos\ContentRepository\Core\Feature\NodeTypeChange\Command; /** @codingStandardsIgnoreStart */ -use Neos\ContentRepository\Core\Feature\NodeTypeChange\Dto\NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy; -/** @codingStandardsIgnoreEnd */ + use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; -use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; -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\MatchableWithNodeIdToPublishOrDiscardInterface; +use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; +use Neos\ContentRepository\Core\Feature\NodeTypeChange\Dto\NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; +use Neos\ContentRepository\Core\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; + +/** @codingStandardsIgnoreEnd */ /** * @api commands are the write-API of the ContentRepository @@ -41,7 +42,6 @@ public function __construct( public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $newNodeTypeName, public readonly NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy $strategy, - public readonly UserId $initiatingUserId, /** * NodeAggregateIds for tethered descendants (optional). * @@ -64,7 +64,6 @@ public static function fromArray(array $array): self NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['newNodeTypeName']), NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy::from($array['strategy']), - UserId::fromString($array['initiatingUserId']), isset($array['tetheredDescendantNodeAggregateIds']) ? NodeAggregateIdsByNodePaths::fromArray($array['tetheredDescendantNodeAggregateIds']) : null @@ -89,7 +88,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $this->nodeAggregateId, $this->newNodeTypeName, $this->strategy, - $this->initiatingUserId, $this->tetheredDescendantNodeAggregateIds ); } @@ -99,14 +97,7 @@ public function createCopyForContentStream(ContentStreamId $target): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'newNodeTypeName' => $this->newNodeTypeName, - 'strategy' => $this->strategy, - 'initiatingUserId' => $this->initiatingUserId, - 'tetheredDescendantNodeAggregateIds' => $this->tetheredDescendantNodeAggregateIds - ]; + return get_object_vars($this); } /** @@ -123,7 +114,6 @@ public function withTetheredDescendantNodeAggregateIds( $this->nodeAggregateId, $this->newNodeTypeName, $this->strategy, - $this->initiatingUserId, $tetheredDescendantNodeAggregateIds ); } diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php index 5990a9c7bf4..a31a1d65484 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeVariation/Command/CreateNodeVariant.php @@ -15,13 +15,12 @@ namespace Neos\ContentRepository\Core\Feature\NodeVariation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; 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\ContentStreamId; +use Neos\ContentRepository\Core\Feature\WorkspacePublication\Dto\NodeIdToPublishOrDiscard; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; -use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; -use Neos\ContentRepository\Core\SharedModel\User\UserId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Create a variant of a node in a content stream @@ -41,7 +40,6 @@ public function __construct( public readonly NodeAggregateId $nodeAggregateId, public readonly OriginDimensionSpacePoint $sourceOrigin, public readonly OriginDimensionSpacePoint $targetOrigin, - public readonly UserId $initiatingUserId ) { } @@ -55,7 +53,6 @@ public static function fromArray(array $array): self NodeAggregateId::fromString($array['nodeAggregateId']), OriginDimensionSpacePoint::fromArray($array['sourceOrigin']), OriginDimensionSpacePoint::fromArray($array['targetOrigin']), - UserId::fromString($array['initiatingUserId']) ); } @@ -64,13 +61,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'sourceOrigin' => $this->sourceOrigin, - 'targetOrigin' => $this->targetOrigin, - 'initiatingUserId' => $this->initiatingUserId - ]; + return get_object_vars($this); } public function matchesNodeId(NodeIdToPublishOrDiscard $nodeIdToPublish): bool @@ -87,7 +78,6 @@ public function createCopyForContentStream(ContentStreamId $target): CommandInte $this->nodeAggregateId, $this->sourceOrigin, $this->targetOrigin, - $this->initiatingUserId ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php index 11ca2fe6994..0cd4720d6ff 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php @@ -15,11 +15,10 @@ namespace Neos\ContentRepository\Core\Feature\RootNodeCreation\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -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\UserId; +use Neos\ContentRepository\Core\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Create root node aggregate with node command @@ -38,7 +37,6 @@ public function __construct( public readonly ContentStreamId $contentStreamId, public readonly NodeAggregateId $nodeAggregateId, public readonly NodeTypeName $nodeTypeName, - public readonly UserId $initiatingUserId ) { } @@ -51,7 +49,6 @@ public static function fromArray(array $array): self ContentStreamId::fromString($array['contentStreamId']), NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['nodeTypeName']), - UserId::fromString($array['initiatingUserId']) ); } @@ -60,12 +57,7 @@ public static function fromArray(array $array): self */ public function jsonSerialize(): array { - return [ - 'contentStreamId' => $this->contentStreamId, - 'nodeAggregateId' => $this->nodeAggregateId, - 'nodeTypeName' => $this->nodeTypeName, - 'initiatingUserId' => $this->initiatingUserId, - ]; + return get_object_vars($this); } public function createCopyForContentStream(ContentStreamId $target): self @@ -74,7 +66,6 @@ public function createCopyForContentStream(ContentStreamId $target): self $target, $this->nodeAggregateId, $this->nodeTypeName, - $this->initiatingUserId ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php index 7c842d30cb2..9187d3bce5d 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateRootWorkspace.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; 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,7 +33,6 @@ public function __construct( public readonly WorkspaceName $workspaceName, public readonly WorkspaceTitle $workspaceTitle, public readonly WorkspaceDescription $workspaceDescription, - 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 47449198492..4bfb71c08f6 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCreation/Command/CreateWorkspace.php @@ -33,7 +33,6 @@ public function __construct( public readonly WorkspaceName $baseWorkspaceName, public readonly WorkspaceTitle $workspaceTitle, public readonly WorkspaceDescription $workspaceDescription, - public readonly UserId $initiatingUserId, /** * the content stream identifier for the content stream which is created together with the to-be-created * workspace diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php index 7173737e428..efb5e66e693 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardIndividualNodesFromWorkspace.php @@ -30,7 +30,6 @@ final class DiscardIndividualNodesFromWorkspace implements CommandInterface private function __construct( public readonly WorkspaceName $workspaceName, public readonly NodeIdsToPublishOrDiscard $nodesToDiscard, - public readonly UserId $initiatingUserId, /** * Content Stream Id of the newly created fork, which contains the remaining changes which were * not removed @@ -42,12 +41,10 @@ private function __construct( public static function create( WorkspaceName $workspaceName, NodeIdsToPublishOrDiscard $nodesToDiscard, - UserId $initiatingUserId ): self { return new self( $workspaceName, $nodesToDiscard, - $initiatingUserId, ContentStreamId::create() ); } @@ -58,9 +55,8 @@ public static function create( public static function createFullyDeterministic( WorkspaceName $workspaceName, NodeIdsToPublishOrDiscard $nodesToDiscard, - UserId $initiatingUserId, ContentStreamId $newContentStreamId ): self { - return new self($workspaceName, $nodesToDiscard, $initiatingUserId, $newContentStreamId); + return new self($workspaceName, $nodesToDiscard, $newContentStreamId); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php index 0483f80b722..465394eeded 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/DiscardWorkspace.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; -use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -28,7 +27,6 @@ final class DiscardWorkspace implements CommandInterface { private function __construct( public readonly WorkspaceName $workspaceName, - public readonly UserId $initiatingUserId, /** * Content Stream ID of the newly created fork, which contains the remaining changes * which were not removed @@ -37,9 +35,9 @@ private function __construct( ) { } - public static function create(WorkspaceName $workspaceName, UserId $initiatingUserId): self + public static function create(WorkspaceName $workspaceName): self { - return new self($workspaceName, $initiatingUserId, ContentStreamId::create()); + return new self($workspaceName, ContentStreamId::create()); } /** @@ -47,9 +45,8 @@ public static function create(WorkspaceName $workspaceName, UserId $initiatingUs */ public static function createFullyDeterministic( WorkspaceName $workspaceName, - UserId $initiatingUserId, ContentStreamId $newContentStreamId ): self { - return new self($workspaceName, $initiatingUserId, $newContentStreamId); + return new self($workspaceName, $newContentStreamId); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php index 522d79ac6e2..6b26dd1a4f8 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishIndividualNodesFromWorkspace.php @@ -17,7 +17,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; 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; /** @@ -30,7 +29,6 @@ final class PublishIndividualNodesFromWorkspace implements CommandInterface private function __construct( public readonly WorkspaceName $workspaceName, 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: @@ -55,12 +53,10 @@ private function __construct( public static function create( WorkspaceName $workspaceName, NodeIdsToPublishOrDiscard $nodesToPublish, - UserId $initiatingUserId ): self { return new self( $workspaceName, $nodesToPublish, - $initiatingUserId, ContentStreamId::create(), ContentStreamId::create() ); @@ -72,14 +68,12 @@ public static function create( public static function createFullyDeterministic( WorkspaceName $workspaceName, NodeIdsToPublishOrDiscard $nodesToPublish, - UserId $initiatingUserId, ContentStreamId $contentStreamIdForMatchingPart, ContentStreamId $contentStreamIdForRemainingPart ): self { return new self( $workspaceName, $nodesToPublish, - $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 65b764b5fc2..74a070d3cc2 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspacePublication/Command/PublishWorkspace.php @@ -15,7 +15,6 @@ namespace Neos\ContentRepository\Core\Feature\WorkspacePublication\Command; use Neos\ContentRepository\Core\CommandHandler\CommandInterface; -use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -27,7 +26,6 @@ final class PublishWorkspace implements CommandInterface { public function __construct( public readonly WorkspaceName $workspaceName, - public readonly UserId $initiatingUserId ) { } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php index 04eb67b7889..b7f673cc1f4 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceRebase/Command/RebaseWorkspace.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; -use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; /** @@ -28,7 +27,6 @@ final class RebaseWorkspace implements CommandInterface { public function __construct( public readonly WorkspaceName $workspaceName, - public readonly UserId $initiatingUserId, /** * Name of the new content stream which is created during the rebase */ @@ -36,9 +34,9 @@ public function __construct( ) { } - public static function create(WorkspaceName $workspaceName, UserId $initiatingUserId): self + public static function create(WorkspaceName $workspaceName): self { - return new self($workspaceName, $initiatingUserId, ContentStreamId::create()); + return new self($workspaceName, ContentStreamId::create()); } /** @@ -46,9 +44,8 @@ public static function create(WorkspaceName $workspaceName, UserId $initiatingUs */ public static function createFullyDeterministic( WorkspaceName $workspaceName, - UserId $initiatingUserId, ContentStreamId $newContentStreamId ): self { - return new self($workspaceName, $initiatingUserId, $newContentStreamId); + return new self($workspaceName, $newContentStreamId); } }