From ef556a8e32e3750e4a7540171c0cfe7dc7fe8859 Mon Sep 17 00:00:00 2001 From: Sorin Dumitrescu Date: Wed, 3 Feb 2016 15:24:37 +0200 Subject: [PATCH 1/2] Minor update to Symfony version for method override Minor update to Symfony version for method override, when presenting since the method is available. --- cookbook/routing/method_parameters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/routing/method_parameters.rst b/cookbook/routing/method_parameters.rst index be270240dd2..ad3645df4f6 100644 --- a/cookbook/routing/method_parameters.rst +++ b/cookbook/routing/method_parameters.rst @@ -77,7 +77,7 @@ 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. To control it in Symfony 2.2, you + and enabled by default in Symfony 2.3 and above. To control it in Symfony 2.2, you must call :method:`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. From 567ef6aa959b87624a94ab9b1ce045abb96c8174 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Fri, 8 Jul 2016 15:41:06 +0200 Subject: [PATCH 2/2] Change note, as 2.7 doesn't document 2.2 changes. --- cookbook/routing/method_parameters.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cookbook/routing/method_parameters.rst b/cookbook/routing/method_parameters.rst index ad3645df4f6..8395b0694c9 100644 --- a/cookbook/routing/method_parameters.rst +++ b/cookbook/routing/method_parameters.rst @@ -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 ` - 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 @@ -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` for more information. + +.. tip:: + + You can disable the ``_method`` functionality shown here using the + :ref:`configuration-framework-http_method_override` option.