Skip to content

Commit 89e3821

Browse files
committed
Merge pull request #313 from Soullivaneuh/deprecated-form-options
Fix deprecated forms setDefaultOptions method
2 parents d6f32b3 + 52342aa commit 89e3821

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Form/Type/AuthorizeFormType.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Form\FormBuilderInterface;
1515
use Symfony\Component\Form\AbstractType;
16+
use Symfony\Component\OptionsResolver\OptionsResolver;
1617
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
1718

1819
/**
@@ -31,8 +32,18 @@ public function buildForm(FormBuilderInterface $builder, array $options)
3132

3233
/**
3334
* {@inheritdoc}
35+
*
36+
* @todo Remove it when bumping requirements to SF 2.7+
3437
*/
3538
public function setDefaultOptions(OptionsResolverInterface $resolver)
39+
{
40+
$this->configureOptions($resolver);
41+
}
42+
43+
/**
44+
* {@inheritdoc}
45+
*/
46+
public function configureOptions(OptionsResolver $resolver)
3647
{
3748
$resolver->setDefaults(array(
3849
'data_class' => 'FOS\OAuthServerBundle\Form\Model\Authorize'

0 commit comments

Comments
 (0)