interface ExecutionContextInterface
The context of a validation run. The context collects all violations generated during the validation. By default, validators execute all validations in a new context: $violations = $validator->validate($object);
When you make another call to the validator, while the validation is in progress, the violations will be isolated from each other: public function validate($value, Constraint $constraint)
{
$validator = $this->context->getValidator();