-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Added debug:firewall command #39326
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
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.
Looking great already :)
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
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.
Just some comments. Thanks for your enthusiasm about this today!
Btw, #39276 is now merged (but you've probably already discovered that), so this PR is unlocked again
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
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.
If I'm correct, the 2 suggested changes are required to use the authenticator locator.
Or than that (and tests), is there anything preventing this command from being merged? It seems quite feature complete already (and we can always open new PRs to add even more features).
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
@wouterj Thanks for your last suggestion. I'll check if I can make that work and finish up this PR this weekend. |
Made some changes for the last review comments. Added help text and documentation. I think this PR is ready to be reviewed. |
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 promise this was the final round of comments :)
I think this looks really nice and helpful (I've been testing it out on a demo project)! (the duplicate UserProviderListener
in the output already catches my eyes, maybe there is a bug in the security code 👀 )
Most are about CS (we prefer longer lines over many small lines, it takes some getting used to when contributing). Can you please also update the CHANGELOG.md
in the bundle?
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
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.
This looks perfect to me!
It's probably good to add some tests here some day. However, I see all other debug commands also don't have tests, so I'm fine with merging this feature as-is.
Yeah, I've been thinking about tests, but right now it's kinda hard to test command output. Especially when my IDE keeps trying to remove trailing spaces from the expected table output. |
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 like this proposal! Thanks Timo!
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
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.
Here is a cosmetic review. Once addressed, this should be ready to go on my side.
Nice work @TimoBakx
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php
Outdated
Show resolved
Hide resolved
@chalasr Thank you for your CS pointers. It's much appreciated. I addressed all points except for the code-move that I can't do. |
This is great. Thanks a ton Timo for updating your PR with all these review rounds and thinking so hard about all the info that could be displayed here! |
Thank all of you for your reviews and encouragement. My first class added to Symfony. I'm so excited! 🎉 |
This PR was merged into the 5.3-dev branch. Discussion ---------- [Security] Added debug:firewall command Documentation for symfony/symfony#39326 Commits ------- 7512515 [Security] Added debug:firewall command
Subtasks
firewall
argument)debug:event-listener
)--include-listeners
option (default: false)Moved outside of current scope
Usage (and example output) for a list
bin/console debug:firewall
Usage (and example output) for details
bin/console debug:firewall main