From bd069e23db7ebf2b26303e304666a5b8ea1b8599 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 13 May 2018 22:10:48 +0200 Subject: [PATCH] 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 --- reference/forms/types/collection.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index a6cd05fc4c3..9dc6dbf9f6a 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -371,8 +371,8 @@ type This is the field type for each item in this collection (e.g. ``text``, ``choice``, etc). For example, if you have an array of email addresses, you'd use the :doc:`email ` type. If you want -to embed a collection of some other form, create a new instance of your -form type and pass it as this option. +to embed a collection of some other form, pass the form type class as this +option (e.g. ``MyFormType::class``) Inherited Options -----------------