Closed
Description
Related: doctrine/orm#7944
Description:
This is the same issue when ReflectionProperty::getValue() uses an uninitialized argument.
How to reproduce:
Validate an object that has an uninitialized property with type hint:
/**
* @Assert\NotBlank()
*/
public int $id;
Possible Solution:
Something similar to TypedNoDefaultReflectionProperty.php
Symfony\Component\Validator\Mapping\PropertyMetadata::getPropertyValue:
/**
* {@inheritdoc}
*/
public function getPropertyValue($object)
{
$reflectionProperty = $this->getReflectionMember($object);
return $object !== null && $reflectionProperty->isInitialized($object) ? $reflectionProperty->getValue($object) : null;
}