return $this;
} throw new RuntimeException(sprintf('Cannot validate values of type "%s" automatically. Please provide a constraint.',
get_debug_type($value)));
} public function validateProperty(object
$object, string
$propertyName, string|GroupSequence|array
$groups = null
):
static { $classMetadata =
$this->metadataFactory->
getMetadataFor($object);
if (!
$classMetadata instanceof ClassMetadataInterface
) { throw new ValidatorException(sprintf('The metadata factory should return instances of "\Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".',
get_debug_type($classMetadata)));
} $propertyMetadatas =
$classMetadata->
getPropertyMetadata($propertyName);
$groups =
$groups ?
$this->
normalizeGroups($groups) :
$this->defaultGroups;
$cacheKey =
$this->
generateCacheKey($object);
$propertyPath = PropertyPath::
append($this->defaultPropertyPath,
$propertyName);
$previousValue =
$this->context->
getValue();
$previousObject =
$this->context->
getObject();
$previousMetadata =
$this->context->
getMetadata();
$previousPath =
$this->context->
getPropertyPath();