Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d7b7f86

Browse filesBrowse files
authored
Update routing.rst
According to #12455 Fix variable name from locale to _locale in requirements.
1 parent 0106fc9 commit d7b7f86
Copy full SHA for d7b7f86

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎routing.rst

Copy file name to clipboardExpand all lines: routing.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ the common configuration using options when importing the routes.
11321132
use Symfony\Component\Routing\Annotation\Route;
11331133
11341134
/**
1135-
* @Route("/blog", requirements={"locale": "en|es|fr"}, name="blog_")
1135+
* @Route("/blog", requirements={"_locale": "en|es|fr"}, name="blog_")
11361136
*/
11371137
class BlogController
11381138
{
@@ -1165,7 +1165,7 @@ the common configuration using options when importing the routes.
11651165
name_prefix: 'blog_'
11661166
# these requirements are added to all imported routes
11671167
requirements:
1168-
locale: 'en|es|fr'
1168+
_locale: 'en|es|fr'
11691169
# An imported route with an empty URL will become "/blog/"
11701170
# Uncomment this option to make that URL "/blog" instead
11711171
# trailing_slash_on_root: false
@@ -1188,7 +1188,7 @@ the common configuration using options when importing the routes.
11881188
prefix="/blog"
11891189
name-prefix="blog_">
11901190
<!-- these requirements are added to all imported routes -->
1191-
<requirement key="locale">en|es|fr</requirement>
1191+
<requirement key="_locale">en|es|fr</requirement>
11921192
</import>
11931193
11941194
<!-- An imported route with an empty URL will become "/blog/"
@@ -1215,7 +1215,7 @@ the common configuration using options when importing the routes.
12151215
// this is added to the beginning of all imported route names
12161216
->namePrefix('blog_')
12171217
// these requirements are added to all imported routes
1218-
->requirements(['locale' => 'en|es|fr'])
1218+
->requirements(['_locale' => 'en|es|fr'])
12191219
;
12201220
};
12211221

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.