BC Breaks
- Lots.
- Much stricter object types (final, object typehint, etc).
- HandlerLocators are removed in favor of just using PSR-11 directly.
- Class Name and Method inflectors now use class strings instead of object instances.
- Almost all namespaces have been moved around.
- Several old not-so-useful plugins have been dropped: NamedCommands, LockingMiddleware, QuickStart
BC Breaks:
- #150 Drop PHP 7.0 support
New features
- #150 Add PHP 8.0 support
BC Breaks:
- None
New features:
- #118 - Added class name inflector
BC Breaks:
- None
New features:
- #95: Added .gitattributes to speed up installation
BC Breaks:
- None
New features:
- #96: More detailed error message when accidentally passing a non-object into the command bus (array, callable, string, etc).
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:
- None
New features:
- A CallableLocator added, allowing you to retrieve a handler from a single callable. Hopefully this can be used as an alternative to creating all the different Container plugins.
- Officially support PHP7 now
Bug fixes:
BC Breaks:
- None
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:
- A new interface,
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.- The
CommandHandlerMiddleware
now requires aCommandNameExtractor
as its first parameter. To continue using the same behavior you've had until now, you only need to pass in an instance ofClassNameExtractor
New features:
- A new MethodNameInflector is included with core,
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 classRentMovieCommand
would be mapped to the methodhandleRentMovie
.
Bug fixes:
- Several docblocks have been corrected or improved.
BC breaks:
- Removed the
League\Tactician\Command
interface. Now any plain ol' PHP object can be a command! See #43 and #45.
New features:
- None
Bug fixes:
- None
First public release!