// Prevent duplicate validation of constraints, in the case
// that constraints belong to multiple validated groups
if (null !==
$cacheKey) { $constraintHash =
$this->
generateCacheKey($constraint, true
);
// instanceof Valid: In case of using a Valid constraint with many groups
// it makes a reference object get validated by each group
if ($constraint instanceof Composite ||
$constraint instanceof Valid
) { $constraintHash .=
$group;
} if ($context->
isConstraintValidated($cacheKey,
$constraintHash)) { continue;
} $context->
markConstraintAsValidated($cacheKey,
$constraintHash);
} $context->
setConstraint($constraint);
$validator =
$this->validatorFactory->
getInstance($constraint);
$validator->
initialize($context);