From 3cc4b072c310741647b9efd7f959ffed0a593d6c Mon Sep 17 00:00:00 2001 From: Max Kovpak Date: Tue, 25 Aug 2015 17:15:15 +0300 Subject: [PATCH 1/2] POST_BIND deprecated POST_BIND deprecated since version 2.3, to be removed in 3.0. Use POST_SUBMIT instead. --- Type/CaptchaType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Type/CaptchaType.php b/Type/CaptchaType.php index 86d5ddb..bf629a3 100644 --- a/Type/CaptchaType.php +++ b/Type/CaptchaType.php @@ -71,7 +71,7 @@ class CaptchaType extends AbstractType $options['humanity'] ); - $builder->addEventListener(FormEvents::POST_BIND, array($validator, 'validate')); + $builder->addEventListener(FormEvents::POST_SUBMIT, array($validator, 'validate')); } /** From 87d38d98a4e274bfacf606ad0dca5a2413615f67 Mon Sep 17 00:00:00 2001 From: Max Kovpak Date: Wed, 26 Aug 2015 11:26:01 +0300 Subject: [PATCH 2/2] Update CaptchaType.php Checkout version --- Type/CaptchaType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Type/CaptchaType.php b/Type/CaptchaType.php index bf629a3..456d121 100644 --- a/Type/CaptchaType.php +++ b/Type/CaptchaType.php @@ -70,8 +70,8 @@ class CaptchaType extends AbstractType $options['bypass_code'], $options['humanity'] ); - - $builder->addEventListener(FormEvents::POST_SUBMIT, array($validator, 'validate')); + $event = \Symfony\Component\HttpKernel\Kernel::VERSION >= 2.3 ? FormEvents::POST_SUBMIT : FormEvents::POST_BIND; + $builder->addEventListener($event, array($validator, 'validate')); } /**