From 2e49f50c1a1e5032cb42e5308be48a8586b9e8dc Mon Sep 17 00:00:00 2001 From: StudioMaX Date: Thu, 9 Jul 2015 22:19:21 +0600 Subject: [PATCH] Add configureOptions method to form types for SF 2.7 --- Type/CaptchaType.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Type/CaptchaType.php b/Type/CaptchaType.php index 17b4e2f..86d5ddb 100644 --- a/Type/CaptchaType.php +++ b/Type/CaptchaType.php @@ -7,6 +7,7 @@ use Symfony\Component\Form\FormView; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Form\FormEvents; use Symfony\Component\Translation\TranslatorInterface; @@ -122,12 +123,21 @@ class CaptchaType extends AbstractType /** * {@inheritdoc} */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $this->options['mapped'] = false; $resolver->setDefaults($this->options); } + /** + * {@inheritdoc} + * BC for SF < 2.7 + */ + public function setDefaultOptions(OptionsResolverInterface $resolver) + { + $this->configureOptions($resolver); + } + /** * @return string */