Skip to content

Commit

Permalink
Change note, as 2.7 doesn't document 2.2 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Jul 8, 2016
1 parent ef556a8 commit 567ef6a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cookbook/routing/method_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ delete it by matching on GET, PUT and DELETE.
Faking the Method with ``_method``
----------------------------------

.. note::

The ``_method`` functionality shown here is disabled by default in Symfony 2.2
and enabled by default in Symfony 2.3 and above. To control it in Symfony 2.2, you
must call :method:`Request::enableHttpMethodParameterOverride <Symfony\\Component\\HttpFoundation\\Request::enableHttpMethodParameterOverride>`
before you handle the request (e.g. in your front controller). In Symfony
2.3, use the :ref:`configuration-framework-http_method_override` option.

Unfortunately, life isn't quite this simple, since most browsers do not support
sending PUT and DELETE requests via the `method` attribute in an HTML form. Fortunately,
Symfony provides you with a simple way of working around this limitation. By including
Expand All @@ -90,3 +82,8 @@ will use this as the method when matching routes. Forms automatically include a
hidden field for this parameter if their submission method is not GET or POST.
See :ref:`the related chapter in the forms documentation<book-forms-changing-action-and-method>`
for more information.

.. tip::

You can disable the ``_method`` functionality shown here using the
:ref:`configuration-framework-http_method_override` option.

0 comments on commit 567ef6a

Please sign in to comment.