league/tactician
Tactician is a small, pluggable PHP command bus. Route commands to handlers and extend behavior via middleware and plugins (logging, containers, Doctrine transactions, queuing, events, locking). Install with Composer and integrate with your framework of choice.
BC Breaks:
New features:
No changes. The current API has held up for quite sometime and is being used in production by a number of folks. Therefore, Tactician now has official 1.0 support. A huge thanks to everyone who's contributed over the last year!
BC Breaks:
New features:
Bug fixes:
BC Breaks:
New features:
Bug fixes:
tl;dr CommandHandlerMiddleware now requires an extra first parameter, you just need to pass an instance of ClassNameExtractor to it.
BC breaks:
Previously, the HandlerLocator interface was responsible for both mapping a Command to a string name AND looking up that string name in some sort of DI container or locator. That worked alright but made it difficult to use custom naming strategies with different DI containers. Therefore, we've made the following two changes:
CommandNameExtractor is responsible for mapping a Command to a string name.HandlerLocator::getHandlerForCommand() now accepts a string name instead of a Command object as its only parameter.CommandHandlerMiddleware now requires a CommandNameExtractor as its first parameter. To continue using the same behavior you've had until now, you only need to pass in an instance of ClassNameExtractorNew features:
HandleClassNameWithoutSuffix. Since many users suffix their command class names with -Command, this allows you to have Handler methods based on the class name but without that Suffix. In other words, the command class RentMovieCommand would be mapped to the method handleRentMovie.Bug fixes:
BC breaks:
League\Tactician\Command interface. Now any plain ol' PHP object can be a command! See #43 and #45.New features:
Bug fixes:
First public release!
How can I help you explore Laravel packages today?