ExecutionContextInterface deprecated::getGroup()

string getGroup() Returns the validation group that is currently being validated. Return Value string The current validation group.

ExecutionContextInterface deprecated::getClassName()

string|null getClassName() Returns the class name of the current node. If the metadata of the current node does not implement {@link ClassBasedInterface} or if no metadata is available for the current node, this method returns null. Return Value string|null The class name or null, if no class name could be found.

ExecutionContextInterface deprecated::addViolationAt()

addViolationAt(string $subPath, string $message, array $parameters = array(), mixed $invalidValue = null, int|null $plural = null, int|null $code = null) deprecated deprecated since version 2.5, to be removed in 3.0. Use {@link Context\ExecutionContextInterface::buildViolation()} instead. Adds a violation at the validation graph node with the given property path relative to the current property path. Parameters string $subPath The relative property path for the violation string

ExecutionContextInterface deprecated::addViolation()

addViolation(string $message, array $params = array(), mixed $invalidValue = null, int|null $plural = null, int|null $code = null) Adds a violation at the current node of the validation graph. Note: the parameters $invalidValue, $plural and $code are deprecated since version 2.5 and will be removed in 3.0. Parameters string $message The error message array $params The parameters substituted in the error message mixed $invalidValue The invalid, validated value int|null $plural The n

ExecutionContextInterface deprecated

interface ExecutionContextInterface deprecated since version 2.5, to be removed in 3.0. Use {@link Context\ExecutionContextInterface} instead. Stores the validator's state during validation. For example, let's validate the following object graph: (Person)---($firstName: string) \ ($address: Address)---($street: string) We validate the Person instance, which becomes the "root" of the validation run (see {@link getRoot}). The state of the context after the first step will be like

ExecutionContextInterface

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();

ExecutionContextFactoryInterface

interface ExecutionContextFactoryInterface Creates instances of {@link ExecutionContextInterface}. You can use a custom factory if you want to customize the execution context that is passed through the validation run. Methods ExecutionContextInterface createContext(ValidatorInterface $validator, mixed $root) Creates a new execution context. Details ExecutionContextInterface createContext(ValidatorInterface $validator, mixed $root) Creates a new

ExecutionContextFactory

class ExecutionContextFactory implements ExecutionContextFactoryInterface Creates new {@link ExecutionContext} instances. Methods __construct(TranslatorInterface $translator, string|null $translationDomain = null) Creates a new context factory. ExecutionContextInterface createContext(ValidatorInterface $validator, mixed $root) Creates a new execution context. Details __construct(TranslatorInterface $translator, string|null $translationDomain = null)

ExecutionContext::setNode()

setNode(mixed $value, object|null $object, MetadataInterface $metadata = null, string $propertyPath) Sets the currently validated value. Parameters mixed $value The validated value object|null $object The currently validated object MetadataInterface $metadata The validation metadata string $propertyPath The property path to the current value

ExecutionContext::setGroup()

setGroup(string|null $group) Sets the currently validated group. Parameters string|null $group The validated group