From bb6312fd68ab318ee1708b01968e17ec7eb51062 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 3 Apr 2024 21:43:01 +0200 Subject: [PATCH] TASK: Revert assertion inside of aggregate `__construct` --- .../Classes/Projection/ContentGraph/NodeAggregate.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php index 95474721744..3cc7f298ab4 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeAggregate.php @@ -61,8 +61,8 @@ * @param OriginDimensionSpacePointSet $occupiedDimensionSpacePoints dimension space points this aggregate occupies * @param non-empty-array $nodesByOccupiedDimensionSpacePoint At least one node will be occupied. * @param CoverageByOrigin $coverageByOccupant - * @param DimensionSpacePointSet $coveredDimensionSpacePoints At least one node will be covered. - * @param non-empty-array $nodesByCoveredDimensionSpacePoint + * @param DimensionSpacePointSet $coveredDimensionSpacePoints This node aggregate will cover at least one dimension space. + * @param non-empty-array $nodesByCoveredDimensionSpacePoint At least one node will be covered. * @param OriginByCoverage $occupationByCovered * @param DimensionSpacePointsBySubtreeTags $dimensionSpacePointsBySubtreeTags dimension space points for every subtree tag this aggregate is *explicitly* tagged with (excluding inherited tags) */ @@ -81,9 +81,6 @@ public function __construct( private OriginByCoverage $occupationByCovered, private DimensionSpacePointsBySubtreeTags $dimensionSpacePointsBySubtreeTags, ) { - // this nodeAggregate can only exist if it at least contains one node. - assert($this->nodesByOccupiedDimensionSpacePoint !== []); - assert($this->nodesByCoveredDimensionSpacePoint !== []); } public function occupiesDimensionSpacePoint(OriginDimensionSpacePoint $originDimensionSpacePoint): bool