From de04070ba8cdd36d991e9d4075a14bf08b67f657 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 15 Oct 2015 14:57:54 +0200 Subject: [PATCH] Fix the detection of the deprecated usage of the ValidationListener --- .../Extension/Validator/EventListener/ValidationListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php index c760344cfc..1f279faa44 100644 --- a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php @@ -46,7 +46,7 @@ class ValidationListener implements EventSubscriberInterface throw new \InvalidArgumentException('Validator must be instance of Symfony\Component\Validator\Validator\ValidatorInterface or Symfony\Component\Validator\ValidatorInterface'); } - if ($validator instanceof LegacyValidatorInterface) { + if (!$validator instanceof ValidatorInterface) { @trigger_error('Passing an instance of Symfony\Component\Validator\ValidatorInterface as argument to the '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use an implementation of Symfony\Component\Validator\Validator\ValidatorInterface instead', E_USER_DEPRECATED); }