Skip to content

Commit 4bce277

Browse files
committed
[Routing] allow passing multiple environments to Route env option
1 parent 6b6a678 commit 4bce277

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)