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 */