Skip to content

[Debug] Added option to specify the event dispatcher in debug:event-dispatcher #14650

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

Merged
merged 1 commit into from
Dec 7, 2020
Merged

[Debug] Added option to specify the event dispatcher in debug:event-dispatcher #14650

merged 1 commit into from
Dec 7, 2020

Conversation

TimoBakx
Copy link
Member

@TimoBakx TimoBakx commented Dec 3, 2020

Documentation for symfony/symfony#39276

Part of #SymfonyHackday

@TimoBakx TimoBakx requested a review from OskarStark December 5, 2020 13:46
derrabus added a commit to symfony/symfony that referenced this pull request Dec 5, 2020
…spatcher in debug:event-dispatcher (TimoBakx)

This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] Added option to specify the event dispatcher in debug:event-dispatcher

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | symfony/symfony-docs#14650
| Tags | #SymfonyHackday

### 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:
- [x] Add `dispatcher` option
- [x] Add `kernel.event_dispatcher` tag to all event dispatchers
- [x] Add autoconfigure tag for services implementing `EventDispatcherInterface`
- [x] Update Descriptor classes to specify the chosen dispatcher
- [x] Update changelog
- [x] Add documentation

Commits
-------

62398b5 [FrameworkBundle] Added option to specify the event dispatcher in debug:event-dispatcher
@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Dec 6, 2020
@javiereguiluz javiereguiluz added this to the 5.3 milestone Dec 7, 2020
@javiereguiluz javiereguiluz merged commit b288550 into symfony:5.x Dec 7, 2020
@javiereguiluz
Copy link
Member

Hi Timo! Thanks for contributing this feature and its docs!

@TimoBakx TimoBakx deleted the debug-eventdispatcher-firewall branch December 7, 2020 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants