Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[FrameworkBundle] Only show relevant columns indebug:router
call#59780
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:7.4
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
debug:router
call821481d
to44577d0
CompareOddly enough the tests work locally. Any idea why? Or is there a way to generate the expected output from the input? |
Can you share some before/after screenshots? |
Added screenshots oddly enough it does not show the deprecation notice I added. |
debug:router
calldebug:router
callOkay the last remaining error I presume is because the CI tests do not use a true color terminal. Question: should I set the CI colors to use |
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@mamazu I like this a lot. Thanks! Two quick comments: (1): I'd use the HTTP method colors from the OpenAPI standard (and keep (2): I'm divided about outputting the controller. It's useful, but it will break the table design for most people. See your screenshot. Even if you use very short controllers (most folks will display long FQCN) the resulting table is pretty wide. In practice, each row could be displayed in two rows instead. So, why not display each route in two lines since the beginning to avoid breaking the design? |
@javiereguiluz Thanks for the feedback.
|
OskarStark commentedApr 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Because you mentioned "grepability", another approach can also be to use |
You are completely correct, the text representation contains the least amount of infos anyways, so any other format for searching would also work. |
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.json OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.xml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.xml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@@ -84,6 +84,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |||
if ($this->fileLinkFormatter) { | |||
$container = fn () => $this->getContainerBuilder($this->getApplication()->getKernel()); | |||
} | |||
if ($input->getOption('show-controllers')) { | |||
trigger_deprecation('symfony/console', '7.3', 'Using --show-controllers is deprecated. They are shown by default now.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure I see the point of this change. The arguments in the PR description look like personal preference to me. I'd prefer not changing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
In general yes, it's personal preference but there is also a technical argument to it.
TheTextDescriptor
in List mode is the only thing that supports this flag. If you provide an argument for getting the route details or if you use a different formatter none of them use this flag. So this would also remove inconsistency in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think that's sound enough to warrant a deprecation. Consistency is not the main aspect here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fair enough. I'll remove it.
$methods = ['ANY']; | ||
} | ||
return implode('|', array_map(fn (string $method): string => '<fg='.self::VERB_COLORS[$method].'>'.$method.'</>', $methods)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It's possible that $method is not defined in VERB_COLORS (eg TRACE, PURGE, or any custom verb)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should fall back to default now.
The test failures aren't related to the feature. |
@nicolas-grekas So I've removed the deprecation. (I don't know if I can remove the deprecation tag from the PR) Secondly I don't know how the pipeline failures are related to the feature. Could you please restart it or is there anything else I could do? |
Uh oh!
There was an error while loading.Please reload this page.
What I did
Always showing the controllers in the list view (we but not removing the--show-controllers
so it's not a BC break)Why
Screenshots
Before:

After:
