Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
Symfony version(s) affected
7.1.7
Description
What I do:
I create a custom form type for an emali field, which has a name colliding with a Symfony's form type, as following:
<?phpnamespaceApp\Form\User;useSymfony\Component\Form\Extension\Core\Type\EmailTypeasBaseEmailType;useSymfony\Component\Form\AbstractType;useSymfony\Component\OptionsResolver\OptionsResolver;class EmailTypeextends AbstractType{publicfunctionconfigureOptions(OptionsResolver$resolver):void {$resolver->setDefaults([// ... defaults are set here ]); }publicfunctiongetParent():string {return BaseEmailType::class; }}
What I expect:
The form is rendered to the end user.
What I get:
An exception rendered to the end user:
An exception has been thrown during the rendering of a template ("Unable to render the form because the block names array contains duplicates: "_sign_up_email_row", "email_row", "email_row", "text_row", "form_row".").
Experiment:
If I change my form type class name fromEmailType
to anything else, e.g.MailType
, the form is rendered successfully
How to reproduce
(see description)
Possible Solution
No response
Additional Context
No response