[Validator] add deprecation log (#12674)
This commit is contained in:
parent
4e6b74bb00
commit
2e47b62017
@ -52,6 +52,8 @@ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInter
|
|||||||
return parent::validate($value, $constraints, $groups);
|
return parent::validate($value, $constraints, $groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trigger_error('ValidatorInterface::validate() was deprecated in version 2.5 and will be removed in version 3.0. Please use Validator\\ValidatorInterface::validate() instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
$constraint = new Valid(array('traverse' => $traverse, 'deep' => $deep));
|
$constraint = new Valid(array('traverse' => $traverse, 'deep' => $deep));
|
||||||
|
|
||||||
return parent::validate($value, $constraint, $groups);
|
return parent::validate($value, $constraint, $groups);
|
||||||
@ -59,6 +61,8 @@ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInter
|
|||||||
|
|
||||||
public function validateValue($value, $constraints, $groups = null)
|
public function validateValue($value, $constraints, $groups = null)
|
||||||
{
|
{
|
||||||
|
trigger_error('ValidatorInterface::validateValue() was deprecated in version 2.5 and will be removed in version 3.0. Please use Validator\\ValidatorInterface::validate() instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
return parent::validate($value, $constraints, $groups);
|
return parent::validate($value, $constraints, $groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Validator;
|
namespace Symfony\Component\Validator;
|
||||||
|
|
||||||
|
trigger_error('ValidatorInterface was deprecated in version 2.5 and will be removed in version 3.0. Please use Validator\\ValidatorInterface instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates values and graphs of objects and arrays.
|
* Validates values and graphs of objects and arrays.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user