X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FChoiceValidator.php;fp=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FChoiceValidator.php;h=43fecb1137fdb67aedaee1978cb87429ed73f0a1;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=6c81b3b4e0b22a1906668dd4bba63aba3caec22b;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/symfony/validator/Constraints/ChoiceValidator.php b/vendor/symfony/validator/Constraints/ChoiceValidator.php index 6c81b3b4e..43fecb113 100644 --- a/vendor/symfony/validator/Constraints/ChoiceValidator.php +++ b/vendor/symfony/validator/Constraints/ChoiceValidator.php @@ -58,8 +58,8 @@ class ChoiceValidator extends ConstraintValidator $choices = $constraint->choices; } - if (false === $constraint->strict) { - @trigger_error('Setting the strict option of the Choice constraint to false is deprecated since version 3.2 and will be removed in 4.0.', E_USER_DEPRECATED); + if (true !== $constraint->strict) { + @trigger_error('Not setting the strict option of the Choice constraint to true is deprecated since Symfony 3.4 and will throw an exception in 4.0.', E_USER_DEPRECATED); } if ($constraint->multiple) { @@ -77,7 +77,7 @@ class ChoiceValidator extends ConstraintValidator $count = count($value); - if ($constraint->min !== null && $count < $constraint->min) { + if (null !== $constraint->min && $count < $constraint->min) { $this->context->buildViolation($constraint->minMessage) ->setParameter('{{ limit }}', $constraint->min) ->setPlural((int) $constraint->min) @@ -87,7 +87,7 @@ class ChoiceValidator extends ConstraintValidator return; } - if ($constraint->max !== null && $count > $constraint->max) { + if (null !== $constraint->max && $count > $constraint->max) { $this->context->buildViolation($constraint->maxMessage) ->setParameter('{{ limit }}', $constraint->max) ->setPlural((int) $constraint->max)