Skip to content

Commit 9ee69f2

Browse files
committed
[#8928] Fixing a few more bad XML routes
1 parent 9c5f064 commit 9ee69f2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

routing.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ To fix this, add a *requirement* that the ``{page}`` wildcard can *only* match n
204204
xsi:schemaLocation="http://symfony.com/schema/routing
205205
http://symfony.com/schema/routing/routing-1.0.xsd">
206206
207-
<route id="blog_list" path="/blog/{page}">
208-
<controller>App\Controller\BlogController::list</controller>
207+
<route id="blog_list" path="/blog/{page}" controller="App\Controller\BlogController::list">
209208
<requirement key="page">\d+</requirement>
210209
</route>
211210
@@ -297,8 +296,7 @@ So how can you make ``blog_list`` once again match when the user visits
297296
xsi:schemaLocation="http://symfony.com/schema/routing
298297
http://symfony.com/schema/routing/routing-1.0.xsd">
299298
300-
<route id="blog_list" path="/blog/{page}">
301-
<controller>App\Controller\BlogController::list</controller>
299+
<route id="blog_list" path="/blog/{page}" controller="App\Controller\BlogController::list">
302300
<default key="page">1</default>
303301
304302
<requirement key="page">\d+</requirement>
@@ -410,9 +408,9 @@ With all of this in mind, check out this advanced example:
410408
http://symfony.com/schema/routing/routing-1.0.xsd">
411409
412410
<route id="article_show"
413-
path="/articles/{_locale}/{year}/{slug}.{_format}">
411+
path="/articles/{_locale}/{year}/{slug}.{_format}"
412+
controller="App\Controller\ArticleController::show">
414413
415-
<controller>App\Controller\ArticleController::show</controller>
416414
<default key="_format">html</default>
417415
<requirement key="_locale">en|fr</requirement>
418416
<requirement key="_format">html|rss</requirement>

0 commit comments

Comments
 (0)