Skip to content

Commit

Permalink
minor #6235 #6232 update forms as services section (backbone87)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 2.8 branch (closes #6235).

Discussion
----------

#6232 update forms as services section

this is to reflect recent changes to form type handling since symfony 2.8

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.8+
| Fixed tickets | #6232

Commits
-------

be54971 #6232 update forms as services section
  • Loading branch information
xabbuh committed Feb 7, 2016
2 parents dd8585d + be54971 commit 99c8abe
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,9 @@ Registering Forms as Services

You can also
:ref:`register your form type as a service <form-cookbook-form-field-service>`.
But this is *not* recommended unless you plan to reuse the new form type in many
places or embed it in other forms directly or via the
:doc:`CollectionType </reference/forms/types/collection>`.

For most forms that are used only to edit or create something, registering
the form as a service is over-kill, and makes it more difficult to figure
out exactly which form class is being used in a controller.
This is only needed if your form type requires some dependencies to be injected
by the container, otherwise it is unnecessary overhead and therefore *not*
recommended to do this for all form type classes.

Form Button Configuration
-------------------------
Expand Down

0 comments on commit 99c8abe

Please sign in to comment.