diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index af2728b3aa6..b7cea09bba0 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -689,7 +689,7 @@ the relationship between the removed ``Tag`` and ``Task`` object. $originalTags->add($tag); } - $editForm = $this->createForm(new TaskType::class, $task); + $editForm = $this->createForm(TaskType::class, $task); $editForm->handleRequest($request);