|
2 | 2 |
|
3 | 3 | All notable changes to this project will be documented in this file, in reverse chronological order by release. |
4 | 4 |
|
| 5 | +## 2.0.0 - TBD |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- [#450](https://github.com/zendframework/zend-expressive/pull/450) adds support |
| 10 | + for [PSR-11](http://www.php-fig.org/psr/psr-11/); Expressive is now a PSR-11 |
| 11 | + consumer. |
| 12 | + |
| 13 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) updates the |
| 14 | + zend-stratigility dependency to require `^2.0`; this allows usage of both |
| 15 | + the new middleare-based error handling system introduced in zend-stratigility |
| 16 | + 1.3, as well as usage of [http-interop/http-middleware](https://github.com/http-interop/http-middleware) |
| 17 | + implementations with Expressive. The following middleware is now supported: |
| 18 | + - Implementations of `Interop\Http\ServerMiddleware\MiddlewareInterface`. |
| 19 | + - Callable middleware that implements the same signature as |
| 20 | + `Interop\Http\ServerMiddleware\MiddlewareInterface`. |
| 21 | + - Callable middleware using the legacy double-pass signature |
| 22 | + (`function ($request, $response, callable $next)`); these are now decorated |
| 23 | + in `Zend\Stratigility\Middleware\CallableMiddlewareWrapper` instances. |
| 24 | + - Service names resolving to any of the above. |
| 25 | + - Arrays of any of the above; these will be cast to |
| 26 | + `Zend\Stratigility\MiddlewarePipe` instances, piping each middleware. |
| 27 | + |
| 28 | +- [#396](https://github.com/zendframework/zend-expressive/pull/396) adds |
| 29 | + `Zend\Expressive\Middleware\NotFoundHandler`, which provides a way to return a |
| 30 | + templated 404 response to users. This middleware should be used as innermost |
| 31 | + middleware. You may use the new `Zend\Expressive\Container\NotFoundHandlerFactory` |
| 32 | + to generate the instance via your DI container. |
| 33 | + |
| 34 | +- [#396](https://github.com/zendframework/zend-expressive/pull/396) adds |
| 35 | + `Zend\Expressive\Container\ErrorHandlerFactory`, for generating a |
| 36 | + `Zend\Stratigility\Middleware\ErrorHandler` to use with your application. |
| 37 | + If a `Zend\Expressive\Middleware\ErrorResponseGenerator` service is present in |
| 38 | + the container, it will be used to seed the `ErrorHandler` with a response |
| 39 | + generator. If you use this facility, you should enable the |
| 40 | + `zend-expressive.raise_throwables` configuration flag. |
| 41 | + |
| 42 | +- [#396](https://github.com/zendframework/zend-expressive/pull/396) adds |
| 43 | + `Zend\Expressive\Middleware\ErrorResponseGenerator` and |
| 44 | + `Zend\Expressive\Middleware\WhoopsErrorResponseGenerator`, which may be used |
| 45 | + with `Zend\Stratigility\Middleware\ErrorHandler` to generate error responses. |
| 46 | + The first will generate templated error responses if a template renderer is |
| 47 | + composed, and the latter will generate Whoops output. |
| 48 | + You may use the new `Zend\Expressive\Container\ErrorResponseGeneratorFactory` |
| 49 | + and `Zend\Expressive\Container\WhoopsErrorResponseGeneratorFactory`, |
| 50 | + respectively, to create these instances; if you do, assign these to the |
| 51 | + service name `Zend\Expressive\Middleware\ErrorResponseGenerator` to have them |
| 52 | + automatically registered with the `ErrorHandler`. |
| 53 | + |
| 54 | +- [#396](https://github.com/zendframework/zend-expressive/pull/396) adds |
| 55 | + `Zend\Expressive\ApplicationConfigInjectionTrait`, which exposes two methods, |
| 56 | + `injectRoutesFromConfig()` and `injectPipelineFromConfig()`; this trait is now |
| 57 | + composed into the `Application` class. These methods allow you to configure an |
| 58 | + `Application` instance from configuration if desired, and are now used by the |
| 59 | + `ApplicationFactory` to configure the `Application` instance. |
| 60 | + |
| 61 | +- [#396](https://github.com/zendframework/zend-expressive/pull/396) adds |
| 62 | + a vendor binary, `vendor/bin/expressive-tooling`, which will install (or |
| 63 | + uninstall) the [zend-expressive-tooling](https://github.com/zendframework/zend-expressive-tooling); |
| 64 | + this package provides migration tools for updating your application to use |
| 65 | + programmatic pipelines and the new error handling strategy, as well as tools |
| 66 | + for identifying usage of the legacy Stratigility request and response |
| 67 | + decorators and error middleware. |
| 68 | + |
| 69 | +- [#413](https://github.com/zendframework/zend-expressive/pull/413) adds the |
| 70 | + middleware `Zend\Expressive\Middleware\ImplicitHeadMiddleware`; this |
| 71 | + middleware can be used to provide implicit support for `HEAD` requests when |
| 72 | + the matched route does not explicitly support the method. |
| 73 | + |
| 74 | +- [#413](https://github.com/zendframework/zend-expressive/pull/413) adds the |
| 75 | + middleware `Zend\Expressive\Middleware\ImplicitOptionsMiddleware`; this |
| 76 | + middleware can be used to provide implicit support for `OPTIONS` requests when |
| 77 | + the matched route does not explicitly support the method; the returned 200 |
| 78 | + response will also include an `Allow` header listing allowed HTTP methods for |
| 79 | + the URI. |
| 80 | + |
| 81 | +- [#426](https://github.com/zendframework/zend-expressive/pull/426) adds the |
| 82 | + method `Application::getRoutes()`, which will return the list of |
| 83 | + `Zend\Expressive\Router\Route` instances currently registered with the |
| 84 | + application. |
| 85 | + |
| 86 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) adds the |
| 87 | + class `Zend\Expressive\Delegate\NotFoundDelegate`, an |
| 88 | + `Interop\Http\ServerMiddleware\DelegateInterface` implementation. The class |
| 89 | + will return a 404 response; if a `TemplateRendererInterface` is available and |
| 90 | + injected into the delegate, it will provide templated contents for the 404 |
| 91 | + response as well. We also provide `Zend\Expressive\Container\NotFoundDelegateFactory` |
| 92 | + for providing an instance. |
| 93 | + |
| 94 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) adds the |
| 95 | + method `Zend\Expressive\Application::getDefaultDelegate()`. This method will |
| 96 | + return the default `Interop\Http\ServerMiddleware\DelegateInterface` injected |
| 97 | + during instantiation, or, if none was injected, lazy load an instance of |
| 98 | + `Zend\Expressive\Delegate\NotFoundDelegate`. |
| 99 | + |
| 100 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) adds the |
| 101 | + constants `DISPATCH_MIDDLEWARE` and `ROUTING_MIDDLEWARE` to |
| 102 | + `Zend\Expressive\Application`; they have identical values to the constants |
| 103 | + previously defined in `Zend\Expressive\Container\ApplicationFactory`. |
| 104 | + |
| 105 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) adds |
| 106 | + `Zend\Expressive\Middleware\LazyLoadingMiddleware`; this essentially extracts |
| 107 | + the logic previously used within `Zend\Expressive\Application` to provide |
| 108 | + container-based middleware to allow lazy-loading only when dispatched. |
| 109 | + |
| 110 | +### Changes |
| 111 | + |
| 112 | +- [#440](https://github.com/zendframework/zend-expressive/pull/440) changes the |
| 113 | + `Zend\Expressive\Application::__call($method, array $args)` signature; in |
| 114 | + previous versions, `$args` did not have a typehint. If you are extending the |
| 115 | + class and overriding this method, you will need to update your signature |
| 116 | + accordingly. |
| 117 | + |
| 118 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) updates |
| 119 | + `Zend\Expressive\Container\ApplicationFactory` to ignore the |
| 120 | + `zend-expressive.raise_throwables` configuration setting; Stratigility 2.X no |
| 121 | + longer catches exceptions in its middleware dispatcher, making the setting |
| 122 | + irrelevant. |
| 123 | + |
| 124 | +- [#422](https://github.com/zendframework/zend-expressive/pull/422) updates the |
| 125 | + zend-expressive-router minimum supported version to 2.0.0. |
| 126 | + |
| 127 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) modifies the |
| 128 | + `Zend\Expressive\Container\ApplicationFactory` constants `DISPATCH_MIDDLEWARE` |
| 129 | + and `ROUTING_MIDDLEWARE` to define themselves based on the constants of the |
| 130 | + same name now defined in `Zend\Expressive\Application`. |
| 131 | + |
| 132 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) modifies the |
| 133 | + constructor of `Zend\Expressive\Application`; the third argument was |
| 134 | + previously a nullable callable `$finalHandler`; it is now a nullable |
| 135 | + `Interop\Http\ServerMiddleware\DelegateInterface` with the name |
| 136 | + `$defaultDelegate`. |
| 137 | + |
| 138 | +- [#450](https://github.com/zendframework/zend-expressive/pull/450) modifies the |
| 139 | + signatures in several classes to typehint against [PSR-11](http://www.php-fig.org/psr/psr-11/) |
| 140 | + instead of [container-interop](https://github.com/container-interop/container-interop); |
| 141 | + these include: |
| 142 | + |
| 143 | + - `Zend\Expressive\AppFactory::create()` |
| 144 | + - `Zend\Expressive\Application::__construct()` |
| 145 | + - `Zend\Expressive\Container\ApplicationFactory::__invoke()` |
| 146 | + - `Zend\Expressive\Container\ErrorHandlerFactory::__invoke()` |
| 147 | + - `Zend\Expressive\Container\ErrorResponseGeneratorFactory::__invoke()` |
| 148 | + - `Zend\Expressive\Container\NotFoundDelegateFactory::__invoke()` |
| 149 | + - `Zend\Expressive\Container\NotFoundHandlerFactory::__invoke()` |
| 150 | + - `Zend\Expressive\Container\WhoopsErrorResponseGeneratorFactory::__invoke()` |
| 151 | + - `Zend\Expressive\Container\WhoopsFactory::__invoke()` |
| 152 | + - `Zend\Expressive\Container\WhoopsPageHandlerFactory::__invoke()` |
| 153 | + |
| 154 | +- [#450](https://github.com/zendframework/zend-expressive/pull/450) changes the |
| 155 | + interface inheritance of `Zend\Expressive\Container\Exception\InvalidServiceException` |
| 156 | + to extend `Psr\Container\ContainerExceptionInterface` instead of |
| 157 | + `Interop\Container\Exception\ContainerException`. |
| 158 | + |
| 159 | +### Deprecated |
| 160 | + |
| 161 | +- Nothing. |
| 162 | + |
| 163 | +### Removed |
| 164 | + |
| 165 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) removes the |
| 166 | + following routing/dispatch methods from `Zend\Expressive\Application`: |
| 167 | + - `routeMiddleware()`; this is now encapsulated in `Zend\Expressive\Middleware\RouteMiddleware`. |
| 168 | + - `dispatchMiddleware()`; this is now encapsulated in `Zend\Expressive\Middleware\DispatchMiddleware`. |
| 169 | + |
| 170 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) removes the |
| 171 | + various "final handler" implementations and related factories. Users should |
| 172 | + now use the "default delegates" as detailed in sections previous. Classes |
| 173 | + and methods removed include: |
| 174 | + - `Zend\Expressive\Application::getFinalHandler()` |
| 175 | + - `Zend\Expressive\TemplatedErrorHandler` |
| 176 | + - `Zend\Expressive\WhoopsErrorHandler` |
| 177 | + - `Zend\Expressive\Container\TemplatedErrorHandlerFactory` |
| 178 | + - `Zend\Expressive\Container\WhoopsErrorHandlerFactory` |
| 179 | + |
| 180 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) removes the |
| 181 | + `Zend\Expressive\ErrorMiddlewarePipe` class, as zend-stratigility 2.X no |
| 182 | + longer defines `Zend\Stratigility\ErrorMiddlewareInterface` or has a concept |
| 183 | + of variant-signature error middleware. Use standard middleware to provide |
| 184 | + error handling now. |
| 185 | + |
| 186 | +- [#428](https://github.com/zendframework/zend-expressive/pull/428) removes the |
| 187 | + exception types `Zend\Expressive\Container\Exception\InvalidArgumentException` |
| 188 | + (use `Zend\Expressive\Exception\InvalidArgumentException` instead) and |
| 189 | + `Zend\Expressive\Container\Exception\NotFoundException` (which was never used |
| 190 | + internally). |
| 191 | + |
| 192 | +### Fixed |
| 193 | + |
| 194 | +- Nothing. |
| 195 | + |
5 | 196 | ## 1.1.1 - 2017-02-14 |
6 | 197 |
|
7 | 198 | ### Added |
|
0 commit comments