8000 [Validator] Use LogicException for missing Property Access Component … · symfony/symfony@6ac2316 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ac2316

Browse files
committed
[Validator] Use LogicException for missing Property Access Component in comparison constraints
1 parent c9ab846 commit 6ac2316

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Validator/Constraints/AbstractComparison.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\PropertyAccess\PropertyAccess;
1515
use Symfony\Component\Validator\Constraint;
1616
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
17+
use Symfony\Component\Validator\Exception\LogicException;
1718

1819
/**
1920
* Used for the comparison of values.
@@ -46,7 +47,7 @@ public function __construct($options = null)
4647
}
4748

4849
if (isset($options['propertyPath']) && !class_exists(PropertyAccess::class)) {
49-
throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', \get_class($this)));
50+
throw new LogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', \get_class($this)));
5051
}
5152
}
5253

0 commit comments

Comments
 (0)
0