8000 bug #4131 Replaced old way of specifying http method by the new one (… · symfony/symfony-docs@b486b22 · GitHub
[go: up one dir, main page]

Skip to content

Commit b486b22

Browse files
committed
bug #4131 Replaced old way of specifying http method by the new one (Baptouuuu)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4131). Discussion ---------- Replaced old way of specifying http method by the new one | Q | A | ---------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.5+ | Fixed tickets | Commits ------- 20b20ac fix xml to specify a method c9bdb4a replaced old way of specifying http method by the new one
2 parents 189a123 + 7d1ec51 commit b486b22

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cookbook/routing/redirect_trailing_slash.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,15 @@ system, as explained below:
4444
defaults: { _controller: AcmeDemoBundle:Redirecting:removeTrailingSlash }
4545
requirements:
4646
url: .*/$
47-
_method: GET
47+
methods: [GET]
4848
4949
.. code-block:: xml
5050
5151
<?xml version="1.0" encoding="UTF-8" ?>
5252
<routes xmlns="http://symfony.com/schema/routing">
53-
<route id="remove_trailing_slash" path="/{url}">
53+
<route id="remove_trailing_slash" path="/{url}" methods="GET">
5454
<default key="_controller">AcmeDemoBundle:Redirecting:removeTrailingSlash</default>
5555
<requirement key="url">.*/$</requirement>
56-
<requirement key="_method">GET</requirement>
5756
</route>
5857
</routes>
5958
@@ -72,8 +71,11 @@ system, as explained below:
7271
),
7372
array(
7473
'url' => '.*/$',
75-
'_method' => 'GET',
76-
)
74+
),
75+
array(),
76+
'',
77+
array(),
78+
array('GET')
7779
)
7880
);
7981

0 commit comments

Comments
 (0)
0