diff --git a/Classes/EventStore/Normalizer/ValueObjectNormalizer.php b/Classes/EventStore/Normalizer/ValueObjectNormalizer.php index af52abeb..dc25f11b 100644 --- a/Classes/EventStore/Normalizer/ValueObjectNormalizer.php +++ b/Classes/EventStore/Normalizer/ValueObjectNormalizer.php @@ -15,7 +15,7 @@ * * they are public * * they are static * * they expect a single parameter of the given type - * * they have a "self" or "" return type annotation + * * they have a "self", "static" or "" return type annotation * * Note: For type "array" a named constructor fromArray() is required! */ @@ -116,7 +116,7 @@ private function resolveNamedConstructorMethod(string $dataType, string $classNa return null; } $constructorMethodReturnTypeName = $constructorMethodReturnType->getName(); - if ($constructorMethodReturnTypeName !== $className && $constructorMethodReturnTypeName !== 'self') { + if ($constructorMethodReturnTypeName !== $className && $constructorMethodReturnTypeName !== 'self' && $constructorMethodReturnTypeName !== 'static') { return null; } $this->resolveNamedConstructorMethodCache[$cacheIdentifier] = $constructorMethod;