Skip to content

Commit

Permalink
Merge pull request #5002 from neos/feature/4996-add-workspacename-to-…
Browse files Browse the repository at this point in the history
…events

!!! FEATURE: Add `workspaceName` to relevant events
  • Loading branch information
kitsunet committed May 18, 2024
2 parents 8f18250 + 7caba3c commit d10bc0f
Show file tree
Hide file tree
Showing 79 changed files with 469 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Feature: Run integrity violation detection regarding hierarchy relations and nod
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Feature: Run integrity violation detection regarding parent relations
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -36,6 +37,7 @@ Feature: Run integrity violation detection regarding parent relations
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-nodeward-nodington-iii" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -46,6 +48,7 @@ Feature: Run integrity violation detection regarding parent relations
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Feature: Run integrity violation detection regarding reference relations
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "source-nodandaise" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -38,6 +39,7 @@ Feature: Run integrity violation detection regarding reference relations
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "anthony-destinode" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Feature: Run integrity violation detection regarding sibling sorting
Scenario: Create two siblings and set the sorting to the same value
When the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -37,6 +38,7 @@ Feature: Run integrity violation detection regarding sibling sorting
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "noderella-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Feature: Run integrity violation detection regarding subtree tag inheritance
Scenario: Create nodes, disable the topmost and remove some restriction edges manually
When the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -38,6 +39,7 @@ Feature: Run integrity violation detection regarding subtree tag inheritance
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-nodeward-nodington-iii" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -48,6 +50,7 @@ Feature: Run integrity violation detection regarding subtree tag inheritance
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -58,6 +61,7 @@ Feature: Run integrity violation detection regarding subtree tag inheritance
| nodeAggregateClassification | "regular" |
And the event SubtreeWasTagged was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-david-nodenborough" |
| affectedDimensionSpacePoints | [{"language":"de"},{"language":"gsw"},{"language":"fr"}] |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Feature: Run projection integrity violation detection regarding naming of tether
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -38,6 +39,7 @@ Feature: Run projection integrity violation detection regarding naming of tether
Scenario: Remove tethered node's name
When the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nodewyn-tetherton" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
class PerformanceMeasurementService implements ContentRepositoryServiceInterface
{
private ContentStreamId $contentStreamId;
private WorkspaceName $workspaceName;
private DimensionSpacePointSet $dimensionSpacePoints;
private ContentStreamEventStreamName $contentStreamEventStream;

Expand All @@ -55,6 +56,7 @@ public function __construct(
private readonly ContentRepositoryId $contentRepositoryId
) {
$this->contentStreamId = contentStreamId::fromString('cs-identifier');
$this->workspaceName = WorkspaceName::fromString('some-workspace');
$this->dimensionSpacePoints = new DimensionSpacePointSet([
DimensionSpacePoint::fromArray(['language' => 'mul']),
DimensionSpacePoint::fromArray(['language' => 'de']),
Expand Down Expand Up @@ -86,6 +88,7 @@ public function createNodesForPerformanceTest(int $nodesPerLevel, int $levels):

$rootNodeAggregateId = nodeAggregateId::fromString('lady-eleonode-rootford');
$rootNodeAggregateWasCreated = new RootNodeAggregateWithNodeWasCreated(
$this->workspaceName,
$this->contentStreamId,
$rootNodeAggregateId,
NodeTypeName::fromString('Neos.ContentRepository:Root'),
Expand Down Expand Up @@ -129,6 +132,7 @@ private function createHierarchy(
for ($i = 0; $i < $numberOfNodes; $i++) {
$nodeAggregateId = nodeAggregateId::create();
$events[] = new NodeAggregateWithNodeWasCreated(
$this->workspaceName,
$this->contentStreamId,
$nodeAggregateId,
NodeTypeName::fromString('Neos.ContentRepository:Testing'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Feature: Move a node without content dimensions
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -40,6 +41,7 @@ Feature: Move a node without content dimensions
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand All @@ -50,6 +52,7 @@ Feature: Move a node without content dimensions
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "sir-nodeward-nodington-iii" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand Down Expand Up @@ -130,6 +133,7 @@ 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 |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "lady-abigail-nodenborough" |
| nodeTypeName | "Neos.ContentRepository.Testing:Document" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Feature: ForkContentStream Without Dimensions
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Content" |
Expand All @@ -40,6 +41,7 @@ Feature: ForkContentStream Without Dimensions
| nodeAggregateClassification | "regular" |
And the event NodePropertiesWereSet was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {} |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Feature: On forking a content stream, hidden nodes should be correctly copied as
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "the-great-nodini" |
| nodeTypeName | "Neos.ContentRepository.Testing:Content" |
Expand All @@ -39,6 +40,7 @@ Feature: On forking a content stream, hidden nodes should be correctly copied as
| nodeAggregateClassification | "regular" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nodingers-cat" |
| nodeTypeName | "Neos.ContentRepository.Testing:Content" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Feature: ForkContentStream Without Dimensions
| nodeTypeName | "Neos.ContentRepository:Root" |
And the event NodeAggregateWithNodeWasCreated was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| nodeTypeName | "Neos.ContentRepository.Testing:Content" |
Expand All @@ -40,6 +41,7 @@ Feature: ForkContentStream Without Dimensions
| nodeAggregateClassification | "regular" |
And the event NodePropertiesWereSet was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {} |
Expand All @@ -63,6 +65,7 @@ Feature: ForkContentStream Without Dimensions
| sourceContentStreamId | "cs-identifier" |
And the event NodePropertiesWereSet was published with payload:
| Key | Value |
| workspaceName | "user" |
| contentStreamId | "user-cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {} |
Expand Down Expand Up @@ -92,6 +95,7 @@ Feature: ForkContentStream Without Dimensions
| sourceContentStreamId | "cs-identifier" |
And the event NodePropertiesWereSet was published with payload:
| Key | Value |
| workspaceName | "live" |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {} |
Expand Down

0 comments on commit d10bc0f

Please sign in to comment.