From d7b7f86ac742d1e53067a5e8933cfbdd07ebd97b Mon Sep 17 00:00:00 2001
From: ymc-sise <1014016+ymc-sise@users.noreply.github.com>
Date: Thu, 10 Oct 2019 18:00:07 +0200
Subject: [PATCH] Update routing.rst
According to https://github.com/symfony/symfony-docs/issues/12455
Fix variable name from locale to _locale in requirements.
---
routing.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/routing.rst b/routing.rst
index 7d48be61c17..7a2e837c155 100644
--- a/routing.rst
+++ b/routing.rst
@@ -1132,7 +1132,7 @@ the common configuration using options when importing the routes.
use Symfony\Component\Routing\Annotation\Route;
/**
- * @Route("/blog", requirements={"locale": "en|es|fr"}, name="blog_")
+ * @Route("/blog", requirements={"_locale": "en|es|fr"}, name="blog_")
*/
class BlogController
{
@@ -1165,7 +1165,7 @@ the common configuration using options when importing the routes.
name_prefix: 'blog_'
# these requirements are added to all imported routes
requirements:
- locale: 'en|es|fr'
+ _locale: 'en|es|fr'
# An imported route with an empty URL will become "/blog/"
# Uncomment this option to make that URL "/blog" instead
# trailing_slash_on_root: false
@@ -1188,7 +1188,7 @@ the common configuration using options when importing the routes.
prefix="/blog"
name-prefix="blog_">
- en|es|fr
+ en|es|fr