Add commands for inspecting configured listeners#12165
Add commands for inspecting configured listeners#12165greg0ire merged 3 commits intodoctrine:3.6.xfrom
Conversation
|
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
|
Still waiting for review 😄 |
| } | ||
|
|
||
| /** @return MockObject&ManagerRegistry */ | ||
| private function getMockManagerRegistry(): MockObject |
There was a problem hiding this comment.
| private function getMockManagerRegistry(): MockObject | |
| private function getMockManagerRegistry(): ManagerRegistry |
Let's pick the more obvious type here and in the other tests.
|
|
||
| use function assert; | ||
|
|
||
| abstract class AbstractCommand extends Command |
There was a problem hiding this comment.
Please flag this class as @internal. I don't want it to be used downstream.
I think so too. |
tests/Tests/ORM/Tools/Console/Command/Debug/DebugEventManagerDoctrineCommandTest.php
Outdated
Show resolved
Hide resolved
|
Can we get a few screenshots? Also, should the new commands be documented here? |
81b11df to
47496ed
Compare
|
Now that I'm seeing the result I'm thinking that maybe But I don't know how realistic your examples are. |
@greg0ire The listeners for each event are sorted by priority, which to me is one of the main benefits of these commands, being able to clearly see the execution order. Putting everything into one table would make that harder to read. |
|
How about you add a table separator between each event, if this is a concern? You can even use a rowspan |
4543032 to
3e25efd
Compare
|
@greg0ire Done, I think it looks better now:
|
|
Gorgeous! |
|
Thanks @HypeMC ! |








Related to doctrine/DoctrineBundle#2032
Similar to Symfony's
debug:event-dispatchercommand, this PR adds two new commands to inspect configured Doctrine event/entity listeners:orm:debug:event-manager— lists event listeners registered in the Doctrine EventManager for a given entity manager (optionally filter by event).orm:debug:entity-listeners— lists entity listeners configured for a given entity class (optionally filter by event).