Skip to content

Commit 8291b93

Browse files
MICKtheBIGfabpot
authored andcommitted
[Validator] Added a deprecation note about setPropertyAccessor #12698
1 parent d0c1e41 commit 8291b93

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)