thephpleague / tactician-bundle

Bundle to integrate Tactician with Symfony projects
MIT License
245 stars 43 forks source link

New feature: tactician:debug CLI helper #71

Closed rosstuck closed 7 years ago

rosstuck commented 7 years ago

Now that dev-master has the ability to automatically map commands based on custom strategies, it might be nice to add a tactician:debug command which dumps which handlers commands are routed to.

Something like:

tactician.commandbus (default)
SomeCommand > some.command.handler
SomeOtherCommand > some.other.command.handler

my.custom.bus
AFakeCommand > a.fake.handler

In terms of implementation, we should probably populate this info into an object at the end of the CommandHandlerPass, then maybe see if we can serialize it into a single parameter at the end of the container.

Alternately, we can serialize the Routing object itself and change the locators to read from it at production time (they'll need a new constructor param to limit themselves to a single bus though).

rosstuck commented 7 years ago

Closing this in favor of #73 (which is almost done itself)