Skip to content

Commit

Permalink
Update README and Changelog for 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
rosstuck committed Apr 4, 2015
1 parent 3ec02a5 commit cc9bd02
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## 0.5.0 (2015-03-30)

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 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 `ClassNameExtractor`

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 class `RentMovieCommand` would be mapped to the method `handleRentMovie`.

Bug fixes:

- Several docblocks have been corrected or improved.

## 0.4.0 (2015-03-30)
BC breaks:

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ The core Tactician package is small but there are several plugin packages that e

## Framework Integration
There is ongoing development for Zend, Symfony2 and Laravel integration packages. Check the github issues to see their status.

## Testing
To run all unit tests, use the locally installed PHPUnit:

~~~
$ ./vendor/bin/phpunit
~~~

0 comments on commit cc9bd02

Please sign in to comment.