Skip to content

Commit

Permalink
Merge pull request #19 from mindplay-dk/3.0.3
Browse files Browse the repository at this point in the history
explicit support for legacy and final PSR-15
  • Loading branch information
mindplay-dk authored May 10, 2018
2 parents 43e997b + 3f79ce4 commit badc349
Show file tree
Hide file tree
Showing 7 changed files with 831 additions and 14 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/.idea
/vendor
/test/build
/composer.lock
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ $response = $dispatcher->dispatch($request);

For simplicity, the middleware-stack in a `Dispatcher` is immutable - if you need a stack you can manipulate, `array`, `ArrayObject`, `SplStack` etc. are all fine choices.

To implement reusable middleware components, you should implement the PSR-15 [MiddlewareInterface](https://github.com/http-interop/http-middleware/blob/master/src/MiddlewareInterface.php).
To implement reusable middleware components, you should implement the [PSR-15](https://packagist.org/packages/psr/http-server-middleware) `MiddlewareInterface`.

```php
use Psr\Http\Message\ServerRequestInterface;
use Interop\Http\ServerMiddleware\MiddlewareInterface;
use Psr\Http\ServerMiddleware\MiddlewareInterface;

class MyMiddleware implements MiddlewareInteface
{
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"require": {
"php": ">=7.0",
"psr/http-message": "^1.0",
"http-interop/http-server-handler": "^1.0",
"http-interop/http-server-middleware": "^1.0",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0",
"http-interop/http-server-middleware": "^1.1.1",
"psr/container": "^1.0",
"mindplay/readable": "^1"
},
Expand Down
Loading

0 comments on commit badc349

Please sign in to comment.