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