diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php index c627cbca972..6289463c04c 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeDuplication/Dto/NodeSubtreeSnapshot.php @@ -4,16 +4,15 @@ namespace Neos\ContentRepository\Core\Feature\NodeDuplication\Dto; +use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; +use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindReferencesFilter; 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\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; -use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; -use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; /** * Implementation detail of {@see CopyNodesRecursively} @@ -51,7 +50,6 @@ public static function fromSubgraphAndStartNode(ContentSubgraphInterface $subgra ) { $childNodes[] = self::fromSubgraphAndStartNode($subgraph, $sourceChildNode); } - /** @var PropertyCollectionInterface $properties */ $properties = $sourceNode->properties; return new self( diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php index 8c43c02ddde..de707fad8f1 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php @@ -67,9 +67,9 @@ public function __construct( * References are NOT part of this API, but can be read through * the subgraph {@see ContentSubgraphInterface::findReferences()}. * - * You can also read the serialized properties {@see PropertyCollectionInterface::serialized()}. + * You can also read the serialized properties {@see PropertyCollection::serialized()}. */ - public readonly PropertyCollectionInterface $properties, + public readonly PropertyCollection $properties, public readonly ?NodeName $nodeName, public readonly Timestamps $timestamps, ) { @@ -84,7 +84,7 @@ public function __construct( */ public function getProperty(string $propertyName): mixed { - return $this->properties->offsetGet($propertyName); + return $this->properties->get($propertyName); } /** @@ -97,7 +97,7 @@ public function getProperty(string $propertyName): mixed */ public function hasProperty(string $propertyName): bool { - return $this->properties->offsetExists($propertyName); + return $this->properties->has($propertyName); } /** diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/PropertyCollection.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/PropertyCollection.php index 8b0d1a2ade2..c98eef08111 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/PropertyCollection.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/PropertyCollection.php @@ -19,9 +19,11 @@ /** * The property collection implementation - * @internal + * + * @extends \IteratorAggregate + * @api */ -final class PropertyCollection implements PropertyCollectionInterface +final class PropertyCollection implements \IteratorAggregate { /** * Properties from Nodes @@ -46,33 +48,23 @@ public function __construct( $this->propertyConverter = $propertyConverter; } - public function offsetExists($offset): bool + public function has(string $propertyName): bool { - return $this->serializedPropertyValues->propertyExists($offset); + return $this->serializedPropertyValues->propertyExists($propertyName); } - public function offsetGet($offset): mixed + public function get(string $propertyName): mixed { - if (!isset($this->deserializedPropertyValuesRuntimeCache[$offset])) { - $serializedProperty = $this->serializedPropertyValues->getProperty($offset); + if (!isset($this->deserializedPropertyValuesRuntimeCache[$propertyName])) { + $serializedProperty = $this->serializedPropertyValues->getProperty($propertyName); if ($serializedProperty === null) { return null; } - $this->deserializedPropertyValuesRuntimeCache[$offset] = + $this->deserializedPropertyValuesRuntimeCache[$propertyName] = $this->propertyConverter->deserializePropertyValue($serializedProperty); } - return $this->deserializedPropertyValuesRuntimeCache[$offset]; - } - - public function offsetSet($offset, $value): never - { - throw new \RuntimeException("Do not use!"); - } - - public function offsetUnset($offset): never - { - throw new \RuntimeException("Do not use!"); + return $this->deserializedPropertyValuesRuntimeCache[$propertyName]; } /** @@ -81,7 +73,7 @@ public function offsetUnset($offset): never public function getIterator(): \Generator { foreach ($this->serializedPropertyValues as $propertyName => $_) { - yield $propertyName => $this->offsetGet($propertyName); + yield $propertyName => $this->get($propertyName); } } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/PropertyCollectionInterface.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/PropertyCollectionInterface.php deleted file mode 100644 index 67f1dab108c..00000000000 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/PropertyCollectionInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @extends \IteratorAggregate - * - * @api - */ -interface PropertyCollectionInterface extends \ArrayAccess, \IteratorAggregate -{ - /** - * Retrieve the serialized property values - */ - public function serialized(): SerializedPropertyValues; -} diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Reference.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Reference.php index 47a0819ae17..6235614d503 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Reference.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Reference.php @@ -28,7 +28,7 @@ final class Reference public function __construct( public readonly Node $node, public readonly ReferenceName $name, - public readonly ?PropertyCollectionInterface $properties + public readonly ?PropertyCollection $properties ) { } } diff --git a/Neos.ContentRepository.Core/Tests/Unit/Projection/ContentGraph/PropertyCollectionTest.php b/Neos.ContentRepository.Core/Tests/Unit/Projection/ContentGraph/PropertyCollectionTest.php index 60d32c7ecdc..6363635c549 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/Projection/ContentGraph/PropertyCollectionTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/Projection/ContentGraph/PropertyCollectionTest.php @@ -80,26 +80,6 @@ public function propertiesCanBeIterated(): void self::assertSame(['someProperty' => 'some deserialized value'], iterator_to_array($collection)); } - /** - * @test - */ - public function offsetSetThrowsAnException(): void - { - $collection = new PropertyCollection(SerializedPropertyValues::fromArray([]), $this->mockPropertyConverter); - $this->expectException(\RuntimeException::class); - $collection->offsetSet('foo', 'bar'); - } - - /** - * @test - */ - public function offsetUnsetThrowsAnException(): void - { - $collection = new PropertyCollection(SerializedPropertyValues::fromArray([]), $this->mockPropertyConverter); - $this->expectException(\RuntimeException::class); - $collection->offsetUnset('foo'); - } - /** * @test */ @@ -109,5 +89,4 @@ public function serializedReturnsSerializedPropertyValues(): void $collection = new PropertyCollection($serializedPropertyValues, $this->mockPropertyConverter); self::assertSame($serializedPropertyValues, $collection->serialized()); } - } diff --git a/Neos.ContentRepository.NodeMigration/src/Filter/PropertyValueFilterFactory.php b/Neos.ContentRepository.NodeMigration/src/Filter/PropertyValueFilterFactory.php index 6d390551c7f..06a5f7fa936 100644 --- a/Neos.ContentRepository.NodeMigration/src/Filter/PropertyValueFilterFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Filter/PropertyValueFilterFactory.php @@ -15,7 +15,6 @@ namespace Neos\ContentRepository\NodeMigration\Filter; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\Projection\ContentGraph\PropertyCollectionInterface; /** * Filter nodes having the given property and its value not empty. @@ -45,7 +44,6 @@ public function matches(Node $node): bool if (is_null($this->propertyName) || !$node->hasProperty($this->propertyName)) { return false; } - /** @var PropertyCollectionInterface $properties */ $properties = $node->properties; $serializedPropertyValue = $properties->serialized()->getProperty($this->propertyName); if (!$serializedPropertyValue) { diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php index c5b76d43218..94003d8bbc4 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/ChangePropertyValueTransformationFactory.php @@ -17,13 +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\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\UserId; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Change the value of a given property. @@ -107,7 +105,6 @@ public function execute( ContentStreamId $contentStreamForWriting ): ?CommandResult { if ($node->hasProperty($this->propertyName)) { - /** @var PropertyCollectionInterface $properties */ $properties = $node->properties; $currentProperty = $properties->serialized()->getProperty($this->propertyName); /** @var \Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue $currentProperty safe since Node::hasProperty */ diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php index 3772ebb53ac..6b457895293 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/RenamePropertyTransformationFactory.php @@ -17,13 +17,10 @@ use Neos\ContentRepository\Core\CommandHandler\CommandResult; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; -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\UserId; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Remove the property @@ -64,7 +61,6 @@ public function execute( ): ?CommandResult { if ($node->hasProperty($this->from)) { - /** @var PropertyCollectionInterface $properties */ $properties = $node->properties; return $this->contentRepository->handle( new SetSerializedNodeProperties( diff --git a/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php b/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php index a59ccae6cee..9b250a9c30c 100644 --- a/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php +++ b/Neos.ContentRepository.NodeMigration/src/Transformation/StripTagsOnPropertyTransformationFactory.php @@ -17,13 +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\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\UserId; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** * Strip all tags on a given property @@ -56,10 +54,9 @@ public function execute( ContentStreamId $contentStreamForWriting ): ?CommandResult { if ($node->hasProperty($this->propertyName)) { - /** @var PropertyCollectionInterface $properties */ $properties = $node->properties; - /** @var \Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue $serializedPropertyValue safe since Node::hasProperty */ $serializedPropertyValue = $properties->serialized()->getProperty($this->propertyName); + assert($serializedPropertyValue !== null); // safe since Node::hasProperty $propertyValue = $serializedPropertyValue->value; if (!is_string($propertyValue)) { throw new \Exception( diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php index cdeb6b8d351..2f45a28127b 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/PropertyAdjustment.php @@ -6,17 +6,15 @@ use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; -use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; -use Neos\ContentRepository\Core\Feature\NodeModification\Event\NodePropertiesWereSet; -use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; -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\UserId; -use Neos\EventStore\Model\EventStream\ExpectedVersion; -use Neos\ContentRepository\Core\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\Feature\NodeModification\Event\NodePropertiesWereSet; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; +use Neos\ContentRepository\Core\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; +use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; +use Neos\EventStore\Model\EventStream\ExpectedVersion; class PropertyAdjustment { @@ -44,7 +42,6 @@ public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): \Generat foreach ($nodeAggregate->getNodes() as $node) { $propertyKeysInNode = []; - /** @var PropertyCollectionInterface $properties */ $properties = $node->properties; foreach ($properties->serialized() as $propertyKey => $property) { $propertyKeysInNode[$propertyKey] = $propertyKey; diff --git a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/ProjectedNodeTrait.php b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/ProjectedNodeTrait.php index 990447e538d..5e61f28f384 100644 --- a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/ProjectedNodeTrait.php +++ b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/ProjectedNodeTrait.php @@ -264,9 +264,9 @@ public function iExpectThisNodeToHaveTheFollowingProperties(TableNode $expectedP $this->assertOnCurrentNode(function (Node $currentNode) use ($expectedProperties) { $properties = $currentNode->properties; foreach ($expectedProperties->getHash() as $row) { - Assert::assertTrue($properties->offsetExists($row['Key']), 'Property "' . $row['Key'] . '" not found'); + Assert::assertTrue($properties->has($row['Key']), 'Property "' . $row['Key'] . '" not found'); $expectedPropertyValue = $this->resolvePropertyValue($row['Value']); - $actualPropertyValue = $properties->offsetGet($row['Key']); + $actualPropertyValue = $properties->get($row['Key']); if ($row['Value'] === 'Date:now') { // we accept 10s offset for the projector to be fine Assert::assertLessThan($actualPropertyValue, $expectedPropertyValue->sub(new \DateInterval('PT10S')), 'Node property ' . $row['Key'] . ' does not match. Expected: ' . json_encode($expectedPropertyValue) . '; Actual: ' . json_encode($actualPropertyValue)); @@ -398,11 +398,11 @@ private function assertReferencesMatch(TableNode $expectedReferencesTable, Refer } else { foreach ($rawExpectedProperties as $propertyName => $rawExpectedPropertyValue) { Assert::assertTrue( - $actualProperties->offsetExists($propertyName), + $actualProperties->has($propertyName), 'Reference property "' . $propertyName . '" not found.' ); $expectedPropertyValue = $this->resolvePropertyValue($rawExpectedPropertyValue); - $actualPropertyValue = $actualProperties->offsetGet($propertyName); + $actualPropertyValue = $actualProperties->get($propertyName); if ($rawExpectedPropertyValue === 'Date:now') { // we accept 10s offset for the projector to be fine Assert::assertLessThan( diff --git a/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php b/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php index 2c6852d3679..4a5fc029280 100644 --- a/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php +++ b/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php @@ -12,20 +12,35 @@ */ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Factory\ContentRepositoryId; +use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue; +use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\ArrayNormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\CollectionTypeDenormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\ScalarNormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\UriNormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\ValueObjectArrayDenormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\ValueObjectBoolDenormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\ValueObjectFloatDenormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\ValueObjectIntDenormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\Normalizer\ValueObjectStringDenormalizer; +use Neos\ContentRepository\Core\Infrastructure\Property\PropertyConverter; +use Neos\ContentRepository\Core\NodeType\NodeType; +use Neos\ContentRepository\Core\NodeType\NodeTypeName; 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\Projection\ContentGraph\PropertyCollection; use Neos\ContentRepository\Core\Projection\ContentGraph\Timestamps; +use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; 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\ContentStreamId; use Neos\Fusion\Tests\Functional\FusionObjects\AbstractFusionObjectTest; use PHPUnit\Framework\MockObject\MockObject; +use Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer; +use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; +use Symfony\Component\Serializer\Serializer; /** * Testcase for the Fusion NodeLabel helper @@ -129,25 +144,27 @@ protected function setUp(): void ->method('getLabel') ->willReturn('Content.Text'); - $textNodeProperties = $this - ->getMockBuilder(PropertyCollectionInterface::class) - ->getMock(); - $textNodeProperties - ->method('offsetExists') - ->willReturnCallback(function ($arg) { - return $arg === 'title' || $arg === 'text'; - }); - $textNodeProperties - ->method('offsetGet') - ->willReturnCallback(function ($arg) { - if ($arg === 'title') { - return 'Some title'; - } - if ($arg === 'text') { - return 'Some text'; - } - return null; - }); + $textNodeProperties = new PropertyCollection( + SerializedPropertyValues::fromArray([ + 'title' => new SerializedPropertyValue('Some title', 'string'), + 'text' => new SerializedPropertyValue('Some text', 'string'), + ]), + new PropertyConverter( + new Serializer([ + new DateTimeNormalizer(), + new ScalarNormalizer(), + new BackedEnumNormalizer(), + new ArrayNormalizer(), + new UriNormalizer(), + new ValueObjectArrayDenormalizer(), + new ValueObjectBoolDenormalizer(), + new ValueObjectFloatDenormalizer(), + new ValueObjectIntDenormalizer(), + new ValueObjectStringDenormalizer(), + new CollectionTypeDenormalizer() + ]) + ) + ); $now = new \DateTimeImmutable();