|
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 |
| -## 1.8.7 - TBD |
| 5 | +## 2.0.0 - 2018-09-27 |
6 | 6 |
|
7 | 7 | ### Added
|
8 | 8 |
|
9 |
| -- Nothing. |
| 9 | +- [#326](https://github.com/zendframework/zend-diactoros/pull/326) adds [PSR-17](https://www.php-fig.org/psr/psr-17/) HTTP Message Factory implementations, including: |
| 10 | + |
| 11 | + - `Zend\Diactoros\RequestFactory` |
| 12 | + - `Zend\Diactoros\ResponseFactory` |
| 13 | + - `Zend\Diactoros\ServerRequestFactory` |
| 14 | + - `Zend\Diactoros\StreamFactory` |
| 15 | + - `Zend\Diactoros\UploadedFileFactory` |
| 16 | + - `Zend\Diactoros\UriFactory` |
| 17 | + |
| 18 | + These factories may be used to produce the associated instances; we encourage |
| 19 | + users to rely on the PSR-17 factory interfaces to allow exchanging PSR-7 |
| 20 | + implementations within their applications. |
| 21 | + |
| 22 | +- [#328](https://github.com/zendframework/zend-diactoros/pull/328) adds a package-level exception interface, `Zend\Diactoros\Exception\ExceptionInterface`, |
| 23 | + and several implementations for specific exceptions raised within the package. |
| 24 | + These include: |
| 25 | + |
| 26 | + - `Zend\Diactoros\Exception\DeserializationException` (extends `UnexpectedValueException`) |
| 27 | + - `Zend\Diactoros\Exception\InvalidArgumentException` (extends `InvalidArgumentException`) |
| 28 | + - `Zend\Diactoros\Exception\InvalidStreamPointerPositionException` (extends `RuntimeException`) |
| 29 | + - `Zend\Diactoros\Exception\SerializationException` (extends `UnexpectedValueException`) |
| 30 | + - `Zend\Diactoros\Exception\UnreadableStreamException` (extends `RuntimeException`) |
| 31 | + - `Zend\Diactoros\Exception\UnrecognizedProtocolVersionException` (extends `UnexpectedValueException`) |
| 32 | + - `Zend\Diactoros\Exception\UnrewindableStreamException` (extends `RuntimeException`) |
| 33 | + - `Zend\Diactoros\Exception\UnseekableStreamException` (extends `RuntimeException`) |
| 34 | + - `Zend\Diactoros\Exception\UntellableStreamException` (extends `RuntimeException`) |
| 35 | + - `Zend\Diactoros\Exception\UnwritableStreamException` (extends `RuntimeException`) |
| 36 | + - `Zend\Diactoros\Exception\UploadedFileAlreadyMovedException` (extends `RuntimeException`) |
| 37 | + - `Zend\Diactoros\Exception\UploadedFileErrorException` (extends `RuntimeException`) |
10 | 38 |
|
11 | 39 | ### Changed
|
12 | 40 |
|
13 |
| -- Nothing. |
| 41 | +- [#329](https://github.com/zendframework/zend-diactoros/pull/329) adds return type hints and scalar parameter type hints wherever possible. |
| 42 | + The changes were done to help improve code quality, in part by reducing manual |
| 43 | + type checking. If you are extending any classes, you may need to update your |
| 44 | + signatures; check the signatures of the class(es) you are extending for changes. |
| 45 | + |
| 46 | +- [#162](https://github.com/zendframework/zend-diactoros/pull/162) modifies `Serializer\Request` such that it now no longer raises an `UnexpectedValueException` via its `toString()` method |
| 47 | + when an unexpected HTTP method is encountered; this can be done safely, as the value can never |
| 48 | + be invalid due to other changes in the same patch. |
| 49 | + |
| 50 | +- [#162](https://github.com/zendframework/zend-diactoros/pull/162) modifies `RequestTrait` such that it now invalidates non-string method arguments to either |
| 51 | + the constructor or `withMethod()`, raising an `InvalidArgumentException` for any that do not validate. |
14 | 52 |
|
15 | 53 | ### Deprecated
|
16 | 54 |
|
17 | 55 | - Nothing.
|
18 | 56 |
|
19 | 57 | ### Removed
|
20 | 58 |
|
21 |
| -- Nothing. |
| 59 | +- [#308](https://github.com/zendframework/zend-diactoros/pull/308) removes the following methods from the `ServerRequestFactory` class: |
| 60 | + - `normalizeServer()` (use `Zend\Diactoros\normalizeServer()` instead) |
| 61 | + - `marshalHeaders()` (use `Zend\Diactoros\marshalHeadersFromSapi()` instead) |
| 62 | + - `marshalUriFromServer()` (use `Zend\Diactoros\marshalUriFromSapi()` instead) |
| 63 | + - `marshalRequestUri()` (use `Uri::getPath()` from the `Uri` instance returned by `marshalUriFromSapi()` instead) |
| 64 | + - `marshalHostAndPortFromHeaders()` (use `Uri::getHost()` and `Uri::getPort()` from the `Uri` instances returned by `marshalUriFromSapi()` instead) |
| 65 | + - `stripQueryString()` (use `explode("?", $path, 2)[0]` instead) |
| 66 | + - `normalizeFiles()` (use `Zend\Diactoros\normalizeUploadedFiles()` instead) |
| 67 | + |
| 68 | +- [#295](https://github.com/zendframework/zend-diactoros/pull/295) removes `Zend\Diactoros\Server`. You can use the `RequestHandlerRunner` class from |
| 69 | + [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) to provide these capabilities instead. |
| 70 | + |
| 71 | +- [#295](https://github.com/zendframework/zend-diactoros/pull/295) removes `Zend\Diactoros\Response\EmitterInterface` and the various emitter implementations. |
| 72 | + These can now be found in the package [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner/), which also provides |
| 73 | + a PSR-7-implementation agnostic way of using them. |
22 | 74 |
|
23 | 75 | ### Fixed
|
24 | 76 |
|
|
0 commit comments