symfony: Form profiler broken after 3.2.8 -> 3.3.0 upgrade

Q A
Bug report? yes
Feature request? no
BC Break report? no (?)
RFC? no
Symfony version 3.3.0

Happens when you open the Form panel (and only form, all other panels are ok) in the profiler and it contains any forms (No forms were submitted for this request doesn’t trigger the exceptions). Clearing the cache doesn’t fix it. Here is a the stack trace (very long). This didn’t happen before the upgrade

Example of forms:

class RegistrationForm extends AbstractType
{
    public function buildForm (FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('network', NetworkType::class, ['label' => false])
            ->add('username', null, ['label' => false, 'attr' => ['placeholder' => 'Username']])
            ->add('email', EmailType::class, ['label' => false, 'attr' => ['placeholder' => 'Email']])
            ->add('plainPassword', RepeatedType::class, [
                'type' => PasswordType::class,
                'first_options' => ['label' => false, 'attr' => ['placeholder' => 'Password']],
                'second_options' => ['label' => false, 'attr' => ['placeholder' => 'Repeat password']],
            ])
            ->add('submit', SubmitType::class, ['label' => 'Register']);
    }

    public function configureOptions (OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => User::class,
            'validation_groups' => 'user_registration'
        ]);
    }
}
class EditUserForm extends AbstractType
{
    public function buildForm (FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('fullName')
            ->add('jobTitle')
            ->add('role', ChoiceType::class, [
                'error_bubbling' => true,
                'choices' => [
                    'Administrator' => User::ROLE_ADMIN,
                    'Developer' => User::ROLE_DEVELOPER,
                    'Watcher' => User::ROLE_READ_ONLY,
                ]
            ]);
    }

    public function configureOptions (OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => User::class,
            'csrf_protection' => false,
            'validation_groups' => 'user_add'
        ]);
    }
}
class CreateUserForm extends AbstractType
{
    public function buildForm (FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('username', TextType::class, ['error_bubbling' => true])
            ->add('email', EmailType::class, ['error_bubbling' => true]);
    }

    public function getParent ()
    {
        return EditUserForm::class;
    }
}

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Can you describe the steps one has to perform to reproduce your issue with the Symfony demo?