Skip to content

Commit 67cc5d1

Browse files
committed
Merge branch '2.2'
2 parents de47600 + 97ac8eb commit 67cc5d1

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cookbook/routing/method_parameters.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
How to use HTTP Methods beyond GET and POST in Routes
55
=====================================================
66

7-
.. versionadded:: 2.2
8-
This functionality is disabled by default in Symfony 2.2. To enable it,
9-
you must call :method:`Request::enableHttpMethodParameterOverride <Symfony\\Component\\HttpFoundation\\Request::enableHttpMethodParameterOverride>`
10-
before you handle the request.
11-
127
The HTTP method of a request is one of the requirements that can be checked
138
when seeing if it matches a route. This is introduced in the routing chapter
149
of the book ":doc:`/book/routing`" with examples using GET and POST. You can
@@ -76,6 +71,15 @@ delete it by matching on GET, PUT and DELETE.
7671
7772
return $collection;
7873
74+
Faking the Method with _method
75+
------------------------------
76+
77+
.. note::
78+
79+
The ``_method`` functionality shown here is disabled by default in Symfony 2.2.
80+
To enable it, you must call :method:`Request::enableHttpMethodParameterOverride <Symfony\\Component\\HttpFoundation\\Request::enableHttpMethodParameterOverride>`
81+
before you handle the request (e.g. in your front controller).
82+
7983
Unfortunately, life isn't quite this simple, since most browsers do not
8084
support sending PUT and DELETE requests. Fortunately Symfony2 provides you
8185
with a simple way of working around this limitation. By including a ``_method``

0 commit comments

Comments
 (0)