Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit b89baae

Browse files
committed
Created CHANGELOG for #32
1 parent fd96cd5 commit b89baae

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,31 @@ All notable changes to this project will be documented in this file, in reverse
1212
- [#36](https://github.com/zendframework/zend-mvc/pull/36) adds more than a
1313
dozen service factories, primarily to separate conditional factories into
1414
discrete factories.
15+
- [#32](https://github.com/zendframework/zend-mvc/pull/32) adds
16+
`Zend\Mvc\MiddlewareListener`, which allows dispatching PSR-7-based middleware
17+
implementing the signature `function (ServerRequestInterface $request,
18+
ResponseInterface $response)`. To dispatch such middleware, point the
19+
`middleware` "default" for a given route to a service name or callable that
20+
will resolve to the middleware:
21+
22+
```php
23+
[ 'router' => 'routes' => [
24+
'path' => [
25+
'type' => 'Literal',
26+
'options' => [
27+
'route' => '/path',
28+
'defaults' => [
29+
'middleware' => 'ServiceNameForPathMiddleware',
30+
],
31+
],
32+
],
33+
]
34+
```
35+
36+
This new listener listens at the same priority as the `DispatchListener`, but,
37+
due to being registered earlier, will invoke first; if the route match does
38+
not resolve to middleware, it will fall through to the original
39+
`DispatchListener`, allowing normal ZF2-style controller dispatch.
1540

1641
### Deprecated
1742

0 commit comments

Comments
 (0)