Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ You should see your ``app_lucky_number`` route in the list:

.. code-block:: terminal

---------------- ------- ------- ----- --------------
Name Method Scheme Host Path
---------------- ------- ------- ----- --------------
app_lucky_number ANY ANY ANY /lucky/number
---------------- ------- ------- ----- --------------
---------------- ------- --------------
Name Method Path
---------------- ------- --------------
app_lucky_number ANY /lucky/number
---------------- ------- --------------

You will also see debugging routes besides ``app_lucky_number`` -- more on
the debugging routes in the next section.
Expand Down
41 changes: 31 additions & 10 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -487,20 +487,23 @@ evaluates them:

$ php bin/console debug:router

---------------- ------- ------- ----- --------------------------------------------
Name Method Scheme Host Path
---------------- ------- ------- ----- --------------------------------------------
homepage ANY ANY ANY /
contact GET ANY ANY /contact
contact_process POST ANY ANY /contact
article_show ANY ANY ANY /articles/{_locale}/{year}/{title}.{_format}
blog ANY ANY ANY /blog/{page}
blog_show ANY ANY ANY /blog/{slug}
---------------- ------- ------- ----- --------------------------------------------
---------------- ------- --------------------------------------------
Name Method Path
---------------- ------- --------------------------------------------
homepage ANY /
contact GET /contact
contact_process POST /contact
article_show ANY /articles/{_locale}/{year}/{title}.{_format}
blog ANY /blog/{page}
blog_show ANY /blog/{slug}
---------------- ------- --------------------------------------------

# pass this option to also display all the defined route aliases
$ php bin/console debug:router --show-aliases

# pass this option to also display the associated controllers with the routes
$ php bin/console debug:router --show-controllers

# pass this option to only display routes that match the given HTTP method
# (you can use the special value ANY to see routes that match any method)
$ php bin/console debug:router --method=GET
Expand All @@ -510,6 +513,24 @@ evaluates them:

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

.. versionadded:: 7.4

For sites that don't have routes with schemes or hosts defined those columns are
hidden. They will be displayed if some routes configure the schema or host properties
of the route

.. code-block:: terminal

$ php bin/console debug:router

------------ ------- ------- --------- ---------
Name Method Scheme Host Path
------------ ------- ------- --------- ---------
homepage ANY http ANY /homapage
contact GET https ANY /contact
contact_post POST ANY localhost /contact
------------ ------- ------- --------- ---------

Pass the name (or part of the name) of some route to this argument to print the
route details:

Expand Down