Skip to content

Commit 0b1da84

Browse files
committed
Minor tweaks
1 parent 4d01648 commit 0b1da84

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

routing.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff 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-
257255
Matching 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+
323319
Matching Expressions
324320
~~~~~~~~~~~~~~~~~~~~
325321

0 commit comments

Comments
 (0)