-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Added option to specify the event dispatcher in debug:event-dispatcher #39276
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.
Thank you @TimoBakx! We completely forgot to update the debug and web profiler features for multiple event dispatchers.
I think this is a great feature. We can improve the DX later on by adding a debug:firewall
command or the like (allowing users to specify the firewall name, rather than a weird security.event_dispatcher.<firewall name>
string - #39321).
The only thing I'm a bit worried about is that the kernel.event_dispatcher
tag is going to disrupt tag autocompletion for kernel.event_subscriber
/kernel.event_listener
tags (causing people to use the wrong tag). Can we maybe find a name that doesn't look similar to another tag?
Hi @wouterj, that is a good point. @weaverryan and I picked
I'm a bit out of ideas on this one. |
Would it make sense to enable auto-configuration for the new tag? |
|
Oh right, sorry. 🙈 |
I'm also a bit of out of ideas. Maybe |
That sound good to me. I'll make the change. |
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php
Outdated
Show resolved
Hide resolved
…ug:event-dispatcher
Thank you @TimoBakx. |
…debug:event-dispatcher (TimoBakx) This PR was merged into the 5.3-dev branch. Discussion ---------- [Debug] Added option to specify the event dispatcher in debug:event-dispatcher Documentation for symfony/symfony#39276 Part of #SymfonyHackday Commits ------- 9695d7e [Debug] Added option to specify the event dispatcher in debug:event-dispatcher
Description:
In the recent security improvements, new event dispatchers were added (one for each firewall). These were not visible in the
debug:event-dispatcher
command. This PR adds an option to define a event dispatcher to show the events (and listeners) for that specific event dispatcher. Without any options, the default dispatcher is shown (identical to previous working)In order to be able to fetch specific event dispatchers, I tagged all event dispatchers with a new
kernel.event-dispatcher
tag.Usage:
bin/console debug:event-dispatcher --dispatcher=[servicename] [other options] [event]
Subtasks:
dispatcher
optionkernel.event_dispatcher
tag to all event dispatchersEventDispatcherInterface