File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -252,14 +252,12 @@ Use the ``methods`` option to restrict the verbs each route should respond to:
252252 automatically for you when the :ref: `framework.http_method_override <configuration-framework-http_method_override >`
253253 option is ``true ``.
254254
255- .. _routing-matching-expressions :
256-
257255Matching Environments
258256~~~~~~~~~~~~~~~~~~~~~
259257
260- The ``env `` option can be used to make a route conditional on the
261- :ref: `configuration environment <configuration-environments >`, the route will
262- only be registered if the environment matches.
258+ Use the ``env `` option to register a route only when the current
259+ :ref: `configuration environment <configuration-environments >` matches the
260+ given value:
263261
264262.. configuration-block ::
265263
@@ -274,11 +272,7 @@ only be registered if the environment matches.
274272
275273 class DefaultController extends AbstractController
276274 {
277- #[Route(
278- '/tools',
279- name: 'tools',
280- env: 'dev',
281- )]
275+ #[Route('/tools', name: 'tools', env: 'dev')]
282276 public function developerTools(): Response
283277 {
284278 // ...
@@ -320,6 +314,8 @@ only be registered if the environment matches.
320314 ;
321315 };
322316
317+ .. _routing-matching-expressions :
318+
323319Matching Expressions
324320~~~~~~~~~~~~~~~~~~~~
325321
You can’t perform that action at this time.
0 commit comments