Skip to content

Commit 1263e7a

Browse files
committed
minor #21300 [Routing] allow passing multiple environments to #[Route] env argument (santysisi)
This PR was merged into the 7.4 branch. Discussion ---------- [Routing] allow passing multiple environments to `#[Route]` `env` argument Closes #21297 Support multiple environments in `Route` attribute's `env` argument Commits ------- 3f8b86e [Routing] allow passing multiple environments to Route `env` argument
2 parents ed6eb2c + 3f8b86e commit 1263e7a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

routing.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,13 @@ given value:
274274
{
275275
// ...
276276
}
277+
278+
// You can also pass an array of environments
279+
#[Route('/tools', name: 'tools', env: ['dev', 'test'])]
280+
public function developerTools(): Response
281+
{
282+
// ...
283+
}
277284
}
278285
279286
.. code-block:: yaml
@@ -312,6 +319,10 @@ given value:
312319
}
313320
};
314321
322+
.. versionadded:: 7.4
323+
324+
The ability to pass an array of environments to the ``env`` argument was introduced in Symfony 7.4.
325+
315326
.. _routing-matching-expressions:
316327

317328
Matching Expressions

0 commit comments

Comments
 (0)