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

Commit 4c44c74

Browse files
committed
Adds CHANGELOG entry for #307
1 parent cf963a9 commit 4c44c74

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

CHANGELOG.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,65 @@ All notable changes to this project will be documented in this file, in reverse
66

77
### Added
88

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)
1027

1128
### Changed
1229

1330
- Nothing.
1431

1532
### Deprecated
1633

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+
1768
- [#303](https://github.com/zendframework/zend-diactoros/pull/303) deprecates `Zend\Diactoros\Response\EmitterInterface` and its various implementations. These are now provided via the
1869
[zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) package as 1:1 substitutions.
1970

0 commit comments

Comments
 (0)