From ebe17df2bae5bde3e8d18fe187a7a7dd3f4f49ae Mon Sep 17 00:00:00 2001 From: Oleh Kostiushko Date: Thu, 21 Aug 2025 11:08:21 +0200 Subject: [PATCH] [Routing] Allow setting multiple envs in `#[Route]` attribute --- routing.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/routing.rst b/routing.rst index 9e83964bd2b..1b1afbb3c65 100644 --- a/routing.rst +++ b/routing.rst @@ -269,11 +269,18 @@ given value: class DefaultController extends AbstractController { - #[Route('/tools', name: 'tools', env: 'dev')] + // Using the Route attribute, you can specify multiple environments + #[Route('/tools', name: 'tools', env: ['test', 'dev'])] public function developerTools(): Response { // ... } + + #[Route('/test', name: 'test', env: 'test')] + public function testScenario(): Response + { + // ... + } } .. code-block:: yaml