Skip to content

Commit 37ce7c1

Browse files
committed
Documenting changes in the debug:router output
1 parent 6b6a678 commit 37ce7c1

File tree

2 files changed

+36
-15
lines changed

2 files changed

+36
-15
lines changed

page_creation.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ You should see your ``app_lucky_number`` route in the list:
125125

126126
.. code-block:: terminal
127127
128-
---------------- ------- ------- ----- --------------
129-
Name Method Scheme Host Path
130-
---------------- ------- ------- ----- --------------
131-
app_lucky_number ANY ANY ANY /lucky/number
132-
---------------- ------- ------- ----- --------------
128+
---------------- ------- --------------
129+
Name Method Path
130+
---------------- ------- --------------
131+
app_lucky_number ANY /lucky/number
132+
---------------- ------- --------------
133133
134134
You will also see debugging routes besides ``app_lucky_number`` -- more on
135135
the debugging routes in the next section.

routing.rst

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -487,20 +487,23 @@ evaluates them:
487487
488488
$ php bin/console debug:router
489489
490-
---------------- ------- ------- ----- --------------------------------------------
491-
Name Method Scheme Host Path
492-
---------------- ------- ------- ----- --------------------------------------------
493-
homepage ANY ANY ANY /
494-
contact GET ANY ANY /contact
495-
contact_process POST ANY ANY /contact
496-
article_show ANY ANY ANY /articles/{_locale}/{year}/{title}.{_format}
497-
blog ANY ANY ANY /blog/{page}
498-
blog_show ANY ANY ANY /blog/{slug}
499-
---------------- ------- ------- ----- --------------------------------------------
490+
---------------- ------- --------------------------------------------
491+
Name Method Path
492+
---------------- ------- --------------------------------------------
493+
homepage ANY /
494+
contact GET /contact
495+
contact_process POST /contact
496+
article_show ANY /articles/{_locale}/{year}/{title}.{_format}
497+
blog ANY /blog/{page}
498+
blog_show ANY /blog/{slug}
499+
---------------- ------- --------------------------------------------
500500
501501
# pass this option to also display all the defined route aliases
502502
$ php bin/console debug:router --show-aliases
503503
504+
# pass this option to also display the associated controllers with the routes
505+
$ php bin/console debug:router --show-controllers
506+
504507
# pass this option to only display routes that match the given HTTP method
505508
# (you can use the special value ANY to see routes that match any method)
506509
$ php bin/console debug:router --method=GET
@@ -510,6 +513,24 @@ evaluates them:
510513

511514
The ``--method`` option was introduced in Symfony 7.3.
512515

516+
.. versionadded:: 7.4
517+
518+
For sites that don't have routes with schemes or hosts defined those columns are
519+
hidden. They will be displayed if some routes configure the schema or host properties
520+
of the route
521+
522+
.. code-block:: terminal
523+
524+
$ php bin/console debug:router
525+
526+
------------ ------- ------- --------- ---------
527+
Name Method Scheme Host Path
528+
------------ ------- ------- --------- ---------
529+
homepage ANY http ANY /homapage
530+
contact GET https ANY /contact
531+
contact_post POST ANY localhost /contact
532+
------------ ------- ------- --------- ---------
533+
513534
Pass the name (or part of the name) of some route to this argument to print the
514535
route details:
515536

0 commit comments

Comments
 (0)