From 3f8b86e7150bd7146df09998b473135e9d1e4c29 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Wed, 20 Aug 2025 19:24:36 -0300 Subject: [PATCH] [Routing] allow passing multiple environments to Route `env` argument --- routing.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/routing.rst b/routing.rst index 9e83964bd2b..8948ab4ae4d 100644 --- a/routing.rst +++ b/routing.rst @@ -274,6 +274,13 @@ given value: { // ... } + + // You can also pass an array of environments + #[Route('/tools', name: 'tools', env: ['dev', 'test'])] + public function developerTools(): Response + { + // ... + } } .. code-block:: yaml @@ -312,6 +319,10 @@ given value: } }; +.. versionadded:: 7.4 + + The ability to pass an array of environments to the ``env`` argument was introduced in Symfony 7.4. + .. _routing-matching-expressions: Matching Expressions