From a08d5191d2a07565a74ffa466cd40e7413cd965c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Bogusz?= Date: Wed, 11 Mar 2020 21:51:14 +0100 Subject: [PATCH] [Validator][Range] Fix typos --- src/Symfony/Component/Validator/Constraints/Range.php | 2 +- src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Validator/Constraints/Range.php b/src/Symfony/Component/Validator/Constraints/Range.php index a916a9625b..b922135ee0 100644 --- a/src/Symfony/Component/Validator/Constraints/Range.php +++ b/src/Symfony/Component/Validator/Constraints/Range.php @@ -65,7 +65,7 @@ class Range extends Constraint parent::__construct($options); if (null === $this->min && null === $this->minPropertyPath && null === $this->max && null === $this->maxPropertyPath) { - throw new MissingOptionsException(sprintf('Either option "min", "minPropertyPath", "max" or "maxPropertyPath" must be given for constraint %s', __CLASS__), ['min', 'max']); + throw new MissingOptionsException(sprintf('Either option "min", "minPropertyPath", "max" or "maxPropertyPath" must be given for constraint %s', __CLASS__), ['min', 'minPropertyPath', 'max', 'maxPropertyPath']); } } } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php index 333edada00..052a8ee024 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php @@ -22,7 +22,7 @@ class RangeTest extends TestCase $this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); $this->expectExceptionMessage('requires only one of the "max" or "maxPropertyPath" options to be set, not both.'); new Range([ - 'max' => 'min', + 'max' => 'max', 'maxPropertyPath' => 'maxPropertyPath', ]); }