Skip to content

Commit

Permalink
[Validator] Added a deprecation note about setPropertyAccessor #12698
Browse files Browse the repository at this point in the history
  • Loading branch information
MICKtheBIG authored and fabpot committed Nov 30, 2014
1 parent 0c7df58 commit c82dc5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Symfony/Component/Validator/ValidatorBuilder.php
Expand Up @@ -301,9 +301,13 @@ public function setTranslationDomain($translationDomain)

/**
* {@inheritdoc}
*
* @deprecated Deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor.
*/
public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor)
{
trigger_error('ValidatorBuilder::setPropertyAccessor() is deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor.', E_USER_DEPRECATED);

if (null !== $this->validatorFactory) {
throw new ValidatorException('You cannot set a property accessor after setting a custom validator factory. Configure your validator factory instead.');
}
Expand Down

0 comments on commit c82dc5e

Please sign in to comment.