-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Improvements for debug:router command #59991
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
Comments
I like what you propose here! For the third point however, I'm a bit skeptical. It feels a bit weird to have a new row like this (I understand that it may be personal taste here). Maybe this could be displayed like this:
Or:
And maybe display aliases in a color like yellow, this is a good idea 👍 I agree having a whole new column for aliases isn't really necessary to me. We could still deal with a new column if we get rid of |
Regarding (1), should we also hide the Regarding (3), if feels difficult to read. I'd keep the
No comment on (2) (4) and (5), looks great. |
This issue does overlap with an older one I have proposed in Feburary maybe we could merge those two: #59767 |
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR proposes several changes/tweaks for the
debug:router
command.For reference purposes, this is the output when running it in the Symfony Demo application:
Example
(1) If the value of
scheme
andhost
isANY
for all routes, don't display those columns. In my experience, it's rare to have different values for these columns, so this is just "noise" and makes rows overflow because route paths can be very long.(2) Partial search should look into route paths too.
For example, if the route name is
user_change_password
and the path is/{_locale}/profile/change-password
, the following search should display the route:In my opinion, folks are usually more aware of route paths rather than their names. For example, you might know that a route contains
.woff2
, so this should work:To avoid confusion, the list of routes shown for partial search, could also include the path (so the user can see where the match occurred) and even display the partial match character in other color or underlined:
(3) Display route aliases in a new row instead of a new column. The table is so wide, that when adding a new column, it usually overflows and makes it very hard to process the contents.
When using the
--show-aliases
option, display route aliases in a single line below the route name:Note: maybe display the
aliases:
label in yellow for better visibility(4) Always show aliases when displaying a single route details.
If I define an alias e.g. for the
blog_index
route, I can't see it even if I add the--show-aliases
option explicitly. Aliases should be displayed by default in route details. No option should be required.(5) Tweak some help comments:
--show-controllers
and--show-aliases
, I'd remove thein overview
part. It should probably bein the list of routes
, but this doesn't seem an important detail to mention--show-aliases
("Show aliases") could be updated toDisplay route aliases (if any)
--show-controllers
("Show assigned controllers") could be updated toDisplay the controller asociated to each route
--raw
option is hard to understand. I didn't look into the code, but applying it makes no difference in the output to me--method
option description could be updated asOnly display routes matching this HTTP method
(the word "filter" is sometimes confusing: filter in or filter out?)The text was updated successfully, but these errors were encountered: