Skip to content

Commit

Permalink
[Validator] add deprecation log (#12674)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian Reichel authored and phramz committed Nov 29, 2014
1 parent 4e6b74b commit 2e47b62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Symfony/Component/Validator/Validator/LegacyValidator.php
Expand Up @@ -52,13 +52,17 @@ public function validate($value, $groups = null, $traverse = false, $deep = fals
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));

return parent::validate($value, $constraint, $groups);
}

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

Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Validator/ValidatorInterface.php
Expand Up @@ -11,6 +11,8 @@

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.
*
Expand Down

0 comments on commit 2e47b62

Please sign in to comment.