Skip to content

[Routing] allow passing multiple environments to #[Route] env argument #21300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down