diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index a2406c7b6e..af3b86c1c6 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -19,7 +19,7 @@ use Symfony\Component\Validator\Exception\OutOfBoundsException; * When validating a group sequence, each group will only be validated if all * of the previous groups in the sequence succeeded. For example: * - * $validator->validateObject($address, new GroupSequence('Basic', 'Strict')); + * $validator->validate($address, new Valid(), new GroupSequence('Basic', 'Strict')); * * In the first step, all constraints that belong to the group "Basic" will be * validated. If none of the constraints fail, the validator will then validate @@ -42,12 +42,12 @@ use Symfony\Component\Validator\Exception\OutOfBoundsException; * Whenever you validate that object in the "Default" group, the group sequence * will be validated: * - * $validator->validateObject($address); + * $validator->validate($address, new Valid()); * * If you want to execute the constraints of the "Default" group for a class * with an overridden default group, pass the class name as group name instead: * - * $validator->validateObject($address, "Address") + * $validator->validate($address, new Valid(), "Address") * * @Annotation * diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php index 4fda437f6c..f6fed2fbee 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php @@ -11,10 +11,7 @@ namespace Symfony\Component\Validator\Context; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Component\Validator\ExecutionContextInterface as LegacyExecutionContextInterface; -use Symfony\Component\Validator\Mapping\MetadataInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; @@ -24,7 +21,7 @@ use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; * The context collects all violations generated during the validation. By * default, validators execute all validations in a new context: * - * $violations = $validator->validateObject($object); + * $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: @@ -34,7 +31,7 @@ use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; * $validator = $this->context->getValidator(); * * // The violations are not added to $this->context - * $violations = $validator->validateObject($value); + * $violations = $validator->validate($value); * } * * However, if you want to add the violations to the current context, use the @@ -47,7 +44,7 @@ use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; * // The violations are added to $this->context * $validator * ->inContext($this->context) - * ->validateObject($value) + * ->validate($value) * ; * } *