-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[FrameworkBundle] Only show relevant columns in debug:router
call and adding colors
#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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
debug:router
call
821481d
to
44577d0
Compare
Oddly 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
call
65d4a5f
to
f7384d1
Compare
Okay 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 |
f7384d1
to
623d688
Compare
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
@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.
|
af774f0
to
fe882b3
Compare
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
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.xml
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.xml
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
d5d400c
to
b6f285a
Compare
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? |
9fad15b
to
bd7a1d2
Compare
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Show resolved
Hide resolved
Rebased to 7.4 and fixed the conflicts. |
debug:router
calldebug:router
call and adding colors
@nicolas-grekas Can you have a look at this again please. It should be ready to merge. |
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
Outdated
Show resolved
Hide resolved
b053d5d
to
6eb665a
Compare
…nd adding colors
6eb665a
to
75728d2
Compare
Thank you @mamazu. |
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:
