Skip to content

Commit

Permalink
changelog and code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Feb 7, 2018
1 parent 287dc0f commit dfcd547
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.0] - 2018-02-07

### Added

- Support for any callable, not only `Closure`.

## [1.0.1] - 2018-01-25

### Fixed
Expand Down Expand Up @@ -76,6 +82,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

First version

[1.1.0]: https://github.com/middlewares/request-handler/compare/v1.0.1...v1.1.0
[1.0.1]: https://github.com/middlewares/request-handler/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/middlewares/request-handler/compare/v0.5.0...v1.0.0
[0.5.0]: https://github.com/middlewares/request-handler/compare/v0.4.0...v0.5.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $dispatcher = new Dispatcher([
$response = $dispatcher->dispatch(new ServerRequest('/hello/world'));
```

When the request handler is invoked, it expects a request attribute to be defined that contains a reference to the handler. The handler must be a string, a `Closure` or an object implementing `MiddlewareInterface` or `RequestHandlerInterface`. If it's a string, a `ContainerInterface` will be used to resolve it and get the `MiddlewareInterface` or `RequestHandlerInterface` to use. If it's a `Closure`, will be converted automatically to `MiddlewareInterface` using the [`Middlewares\Utils\CallableHandler`](https://github.com/middlewares/utils#callablehandler)
When the request handler is invoked, it expects a request attribute to be defined that contains a reference to the handler. The handler must be a string, a callable or an object implementing `MiddlewareInterface` or `RequestHandlerInterface`. If it's a string, a `ContainerInterface` will be used to resolve it and get the `MiddlewareInterface` or `RequestHandlerInterface` to use. If it's a callable, it will be converted automatically to `MiddlewareInterface` using the [`Middlewares\Utils\CallableHandler`](https://github.com/middlewares/utils#callablehandler)

```php
// Use a PSR-11 container to create the intances of the request handlers
Expand Down
1 change: 0 additions & 1 deletion src/RequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace Middlewares;

use Closure;
use Middlewares\Utils\CallableHandler;
use Middlewares\Utils\RequestHandlerContainer;
use Psr\Container\ContainerInterface;
Expand Down

0 comments on commit dfcd547

Please sign in to comment.