diff --git a/best_practices/forms.rst b/best_practices/forms.rst index b9343145a88..43e8c49fa00 100644 --- a/best_practices/forms.rst +++ b/best_practices/forms.rst @@ -49,11 +49,17 @@ form in its own PHP class:: } } +.. best-practice:: + + Put the form type classes in the ``AppBundle\Form`` namespace, unless you + use other custom form classes like data transformers. + To use the class, use ``createForm`` and instantiate the new class:: - use AppBundle\Form\PostType; // ... + use AppBundle\Form\PostType; + // ... public function newAction(Request $request) { $post = new Post();