Skip to content

Commit 53aad1d

Browse files
committed
minor #12745 [Validator] Added a deprecation note about setPropertyAccessor #12698 (MICKtheBIG)
This PR was squashed before being merged into the 2.7 branch (closes #12745). Discussion ---------- [Validator] Added a deprecation note about setPropertyAccessor #12698 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #12698 | License | MIT | Doc PR | Commits ------- c82dc5e [Validator] Added a deprecation note about setPropertyAccessor #12698
2 parents 177d560 + 8291b93 commit 53aad1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ValidatorBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,13 @@ public function setTranslationDomain($translationDomain)
301301

302302
/**
303303
* {@inheritdoc}
304+
*
305+
* @deprecated Deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor.
304306
*/
305307
public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor)
306308
{
309+
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);
310+
307311
if (null !== $this->validatorFactory) {
308312
throw new ValidatorException('You cannot set a property accessor after setting a custom validator factory. Configure your validator factory instead.');
309313
}

0 commit comments

Comments
 (0)