|
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.7.3 - TBD |
| 5 | +## 1.8.0 - 2018-06-27 |
6 | 6 |
|
7 | 7 | ### Added |
8 | 8 |
|
9 | | -- Nothing. |
| 9 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) adds the following functions under the `Zend\Diactoros` namespace, each of |
| 10 | + which may be used to derive artifacts from SAPI supergloabls for the purposes |
| 11 | + of generating a `ServerRequest` instance: |
| 12 | + - `normalizeServer(array $server, callable $apacheRequestHeaderCallback = null) : array` |
| 13 | + (main purpose is to aggregate the `Authorization` header in the SAPI params |
| 14 | + when under Apache) |
| 15 | + - `marshalProtocolVersionFromSapi(array $server) : string` |
| 16 | + - `marshalMethodFromSapi(array $server) : string` |
| 17 | + - `marshalUriFromSapi(array $server, array $headers) : Uri` |
| 18 | + - `marshalHeadersFromSapi(array $server) : array` |
| 19 | + - `parseCookieHeader(string $header) : array` |
| 20 | + - `createUploadedFile(array $spec) : UploadedFile` (creates the instance from |
| 21 | + a normal `$_FILES` entry) |
| 22 | + - `normalizeUploadedFiles(array $files) : UploadedFileInterface[]` (traverses |
| 23 | + a potentially nested array of uploaded file instances and/or `$_FILES` |
| 24 | + entries, including those aggregated under mod_php, php-fpm, and php-cgi in |
| 25 | + order to create a flat array of `UploadedFileInterface` instances to use in a |
| 26 | + request) |
10 | 27 |
|
11 | 28 | ### Changed |
12 | 29 |
|
13 | 30 | - Nothing. |
14 | 31 |
|
15 | 32 | ### Deprecated |
16 | 33 |
|
17 | | -- Nothing. |
| 34 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::normalizeServer()`; the method is |
| 35 | + no longer used internally, and users should instead use `Zend\Diactoros\normalizeServer()`, |
| 36 | + to which it proxies. |
| 37 | + |
| 38 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalHeaders()`; the method is |
| 39 | + no longer used internally, and users should instead use `Zend\Diactoros\marshalHeadersFromSapi()`, |
| 40 | + to which it proxies. |
| 41 | + |
| 42 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalUriFromServer()`; the method |
| 43 | + is no longer used internally. Users should use `marshalUriFromSapi()` instead. |
| 44 | + |
| 45 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalRequestUri()`. the method is no longer |
| 46 | + used internally, and currently proxies to `marshalUriFromSapi()`, pulling the |
| 47 | + discovered path from the `Uri` instance returned by that function. Users |
| 48 | + should use `marshalUriFromSapi()` instead. |
| 49 | + |
| 50 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalHostAndPortFromHeaders()`; the method |
| 51 | + is no longer used internally, and currently proxies to `marshalUriFromSapi()`, |
| 52 | + pulling the discovered host and port from the `Uri` instance returned by that |
| 53 | + function. Users should use `marshalUriFromSapi()` instead. |
| 54 | + |
| 55 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::getHeader()`; the method is no longer |
| 56 | + used internally. Users should copy and paste the functionality into their own |
| 57 | + applications if needed, or rely on headers from a fully-populated `Uri` |
| 58 | + instance instead. |
| 59 | + |
| 60 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::stripQueryString()`; the method is no longer |
| 61 | + used internally, and users can mimic the functionality via the expression |
| 62 | + `$path = explode('?', $path, 2)[0];`. |
| 63 | + |
| 64 | +- [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::normalizeFiles()`; the functionality |
| 65 | + is no longer used internally, and users can use `normalizeUploadedFiles()` as |
| 66 | + a replacement. |
| 67 | + |
| 68 | +- [#303](https://github.com/zendframework/zend-diactoros/pull/303) deprecates `Zend\Diactoros\Response\EmitterInterface` and its various implementations. These are now provided via the |
| 69 | + [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) package as 1:1 substitutions. |
| 70 | + |
| 71 | +- [#303](https://github.com/zendframework/zend-diactoros/pull/303) deprecates the `Zend\Diactoros\Server` class. Users are directed to the `RequestHandlerRunner` class from the |
| 72 | + [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) package as an alternative. |
18 | 73 |
|
19 | 74 | ### Removed |
20 | 75 |
|
|
0 commit comments