Skip to content

Commit b031b97

Browse files
ThomasLandauerxabbuh
authored andcommitted
Updated from new MyFormType() to MyFormType::class
Passing a new instance of the form type gave me this error: > Type error: Argument 1 passed to Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::__construct() must be of the type string, object given
1 parent 6b5b1b2 commit b031b97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reference/forms/types/collection.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ entry_type
340340
This is the field type for each item in this collection (e.g. ``TextType``,
341341
``ChoiceType``, etc). For example, if you have an array of email addresses,
342342
you'd use the :doc:`EmailType </reference/forms/types/email>`. If you want
343-
to embed a collection of some other form, create a new instance of your
344-
form type and pass it as this option.
343+
to embed a collection of some other form, pass the form type class as this
344+
option (e.g. ``MyFormType::class``)
345345

346346
prototype
347347
~~~~~~~~~

0 commit comments

Comments
 (0)