Chris@0: # Changelog Chris@0: Chris@0: All notable changes to this project will be documented in this file, in reverse chronological order by release. Chris@0: Chris@17: ## 1.8.6 - 2018-09-05 Chris@17: Chris@17: ### Added Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Changed Chris@17: Chris@17: - [#325](https://github.com/zendframework/zend-diactoros/pull/325) changes the behavior of `ServerRequest::withParsedBody()`. Per Chris@17: - PSR-7, it now no longer allows values other than `null`, arrays, or objects. Chris@17: Chris@17: - [#325](https://github.com/zendframework/zend-diactoros/pull/325) changes the behavior of each of `Request`, `ServerRequest`, and Chris@17: `Response` in relation to the validation of header values. Previously, we Chris@17: allowed empty arrays to be provided via `withHeader()`; however, this was Chris@17: contrary to the PSR-7 specification. Empty arrays are no longer allowed. Chris@17: Chris@17: ### Deprecated Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Removed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Fixed Chris@17: Chris@17: - [#325](https://github.com/zendframework/zend-diactoros/pull/325) ensures that `Uri::withUserInfo()` no longer ignores values of Chris@17: `0` (numeric zero). Chris@17: Chris@17: - [#325](https://github.com/zendframework/zend-diactoros/pull/325) fixes how header values are merged when calling Chris@17: `withAddedHeader()`, ensuring that array keys are ignored. Chris@17: Chris@17: ## 1.8.5 - 2018-08-10 Chris@17: Chris@17: ### Added Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Changed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Deprecated Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Removed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Fixed Chris@17: Chris@17: - [#324](https://github.com/zendframework/zend-diactoros/pull/324) fixes a reference Chris@17: to an undefined variable in the `ServerRequestFactory`, which made it Chris@17: impossible to fetch a specific header by name. Chris@17: Chris@17: ## 1.8.4 - 2018-08-01 Chris@17: Chris@17: ### Added Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Changed Chris@17: Chris@17: - This release modifies how `ServerRequestFactory` marshals the request URI. In Chris@17: prior releases, we would attempt to inspect the `X-Rewrite-Url` and Chris@17: `X-Original-Url` headers, using their values, if present. These headers are Chris@17: issued by the ISAPI_Rewrite module for IIS (developed by HeliconTech). Chris@17: However, we have no way of guaranteeing that the module is what issued the Chris@17: headers, making it an unreliable source for discovering the URI. As such, we Chris@17: have removed this feature in this release of Diactoros. Chris@17: Chris@17: If you are developing a middleware application, you can mimic the Chris@17: functionality via middleware as follows: Chris@17: Chris@17: ```php Chris@17: use Psr\Http\Message\ResponseInterface; Chris@17: use Psr\Http\Message\ServerRequestInterface; Chris@17: use Psr\Http\Server\RequestHandlerInterface; Chris@17: use Zend\Diactoros\Uri; Chris@17: Chris@17: public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface Chris@17: { Chris@17: $requestUri = null; Chris@17: Chris@17: $httpXRewriteUrl = $request->getHeaderLine('X-Rewrite-Url'); Chris@17: if ($httpXRewriteUrl !== null) { Chris@17: $requestUri = $httpXRewriteUrl; Chris@17: } Chris@17: Chris@17: $httpXOriginalUrl = $request->getHeaderLine('X-Original-Url'); Chris@17: if ($httpXOriginalUrl !== null) { Chris@17: $requestUri = $httpXOriginalUrl; Chris@17: } Chris@17: Chris@17: if ($requestUri !== null) { Chris@17: $request = $request->withUri(new Uri($requestUri)); Chris@17: } Chris@17: Chris@17: return $handler->handle($request); Chris@17: } Chris@17: ``` Chris@17: Chris@17: If you use middleware such as the above, make sure you also instruct your web Chris@17: server to strip any incoming headers of the same name so that you can Chris@17: guarantee they are issued by the ISAPI_Rewrite module. Chris@17: Chris@17: ### Deprecated Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Removed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Fixed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ## 1.8.3 - 2018-07-24 Chris@17: Chris@17: ### Added Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Changed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Deprecated Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Removed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Fixed Chris@17: Chris@17: - [#321](https://github.com/zendframework/zend-diactoros/pull/321) updates the logic in `Uri::withPort()` to ensure that it checks that the Chris@17: value provided is either an integer or a string integer, as only those values Chris@17: may be cast to integer without data loss. Chris@17: Chris@17: - [#320](https://github.com/zendframework/zend-diactoros/pull/320) adds checking within `Response` to ensure that the provided reason Chris@17: phrase is a string; an `InvalidArgumentException` is now raised if it is not. This change Chris@17: ensures the class adheres strictly to the PSR-7 specification. Chris@17: Chris@17: - [#319](https://github.com/zendframework/zend-diactoros/pull/319) provides a fix to `Zend\Diactoros\Response` that ensures that the status Chris@17: code returned is _always_ an integer (and never a string containing an Chris@17: integer), thus ensuring it strictly adheres to the PSR-7 specification. Chris@17: Chris@17: ## 1.8.2 - 2018-07-19 Chris@17: Chris@17: ### Added Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Changed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Deprecated Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Removed Chris@17: Chris@17: - Nothing. Chris@17: Chris@17: ### Fixed Chris@17: Chris@17: - [#318](https://github.com/zendframework/zend-diactoros/pull/318) fixes the logic for discovering whether an HTTPS scheme is in play Chris@17: to be case insensitive when comparing header and SAPI values, ensuring no Chris@17: false negative lookups occur. Chris@17: Chris@17: - [#314](https://github.com/zendframework/zend-diactoros/pull/314) modifies error handling around opening a file resource within Chris@17: `Zend\Diactoros\Stream::setStream()` to no longer use the second argument to Chris@17: `set_error_handler()`, and instead check the error type in the handler itself; Chris@17: this fixes an issue when the handler is nested inside another error handler, Chris@17: which currently has buggy behavior within the PHP engine. Chris@17: Chris@16: ## 1.8.1 - 2018-07-09 Chris@16: Chris@16: ### Added Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Changed Chris@16: Chris@16: - [#313](https://github.com/zendframework/zend-diactoros/pull/313) changes the reason phrase associated with the status code 425 Chris@16: to "Too Early", corresponding to a new definition of the code as specified by the IANA. Chris@16: Chris@16: ### Deprecated Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Removed Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Fixed Chris@16: Chris@16: - [#312](https://github.com/zendframework/zend-diactoros/pull/312) fixes how the `normalizeUploadedFiles()` utility function handles nested trees of Chris@16: uploaded files, ensuring it detects them properly. Chris@16: Chris@16: ## 1.8.0 - 2018-06-27 Chris@16: Chris@16: ### Added Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) adds the following functions under the `Zend\Diactoros` namespace, each of Chris@16: which may be used to derive artifacts from SAPI supergloabls for the purposes Chris@16: of generating a `ServerRequest` instance: Chris@16: - `normalizeServer(array $server, callable $apacheRequestHeaderCallback = null) : array` Chris@16: (main purpose is to aggregate the `Authorization` header in the SAPI params Chris@16: when under Apache) Chris@16: - `marshalProtocolVersionFromSapi(array $server) : string` Chris@16: - `marshalMethodFromSapi(array $server) : string` Chris@16: - `marshalUriFromSapi(array $server, array $headers) : Uri` Chris@16: - `marshalHeadersFromSapi(array $server) : array` Chris@16: - `parseCookieHeader(string $header) : array` Chris@16: - `createUploadedFile(array $spec) : UploadedFile` (creates the instance from Chris@16: a normal `$_FILES` entry) Chris@16: - `normalizeUploadedFiles(array $files) : UploadedFileInterface[]` (traverses Chris@16: a potentially nested array of uploaded file instances and/or `$_FILES` Chris@16: entries, including those aggregated under mod_php, php-fpm, and php-cgi in Chris@16: order to create a flat array of `UploadedFileInterface` instances to use in a Chris@16: request) Chris@16: Chris@16: ### Changed Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Deprecated Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::normalizeServer()`; the method is Chris@16: no longer used internally, and users should instead use `Zend\Diactoros\normalizeServer()`, Chris@16: to which it proxies. Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalHeaders()`; the method is Chris@16: no longer used internally, and users should instead use `Zend\Diactoros\marshalHeadersFromSapi()`, Chris@16: to which it proxies. Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalUriFromServer()`; the method Chris@16: is no longer used internally. Users should use `marshalUriFromSapi()` instead. Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalRequestUri()`. the method is no longer Chris@16: used internally, and currently proxies to `marshalUriFromSapi()`, pulling the Chris@16: discovered path from the `Uri` instance returned by that function. Users Chris@16: should use `marshalUriFromSapi()` instead. Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalHostAndPortFromHeaders()`; the method Chris@16: is no longer used internally, and currently proxies to `marshalUriFromSapi()`, Chris@16: pulling the discovered host and port from the `Uri` instance returned by that Chris@16: function. Users should use `marshalUriFromSapi()` instead. Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::getHeader()`; the method is no longer Chris@16: used internally. Users should copy and paste the functionality into their own Chris@16: applications if needed, or rely on headers from a fully-populated `Uri` Chris@16: instance instead. Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::stripQueryString()`; the method is no longer Chris@16: used internally, and users can mimic the functionality via the expression Chris@16: `$path = explode('?', $path, 2)[0];`. Chris@16: Chris@16: - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::normalizeFiles()`; the functionality Chris@16: is no longer used internally, and users can use `normalizeUploadedFiles()` as Chris@16: a replacement. Chris@16: Chris@16: - [#303](https://github.com/zendframework/zend-diactoros/pull/303) deprecates `Zend\Diactoros\Response\EmitterInterface` and its various implementations. These are now provided via the Chris@16: [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) package as 1:1 substitutions. Chris@16: Chris@16: - [#303](https://github.com/zendframework/zend-diactoros/pull/303) deprecates the `Zend\Diactoros\Server` class. Users are directed to the `RequestHandlerRunner` class from the Chris@16: [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) package as an alternative. Chris@16: Chris@16: ### Removed Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Fixed Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ## 1.7.2 - 2018-05-29 Chris@16: Chris@16: ### Added Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Changed Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Deprecated Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Removed Chris@16: Chris@16: - Nothing. Chris@16: Chris@16: ### Fixed Chris@16: Chris@16: - [#301](https://github.com/zendframework/zend-diactoros/pull/301) adds stricter comparisons within the `uri` class to ensure non-empty Chris@16: values are not treated as empty. Chris@16: Chris@13: ## 1.7.1 - 2018-02-26 Chris@13: Chris@13: ### Added Chris@13: Chris@13: - Nothing. Chris@13: Chris@13: ### Changed Chris@13: Chris@13: - [#293](https://github.com/zendframework/zend-diactoros/pull/293) updates Chris@13: `Uri::getHost()` to cast the value via `strtolower()` before returning it. Chris@13: While this represents a change, it is fixing a bug in our implementation: Chris@13: the PSR-7 specification for the method, which follows IETF RFC 3986 section Chris@13: 3.2.2, requires that the host name be normalized to lowercase. Chris@13: Chris@13: ### Deprecated Chris@13: Chris@13: - Nothing. Chris@13: Chris@13: ### Removed Chris@13: Chris@13: - Nothing. Chris@13: Chris@13: ### Fixed Chris@13: Chris@13: - [#290](https://github.com/zendframework/zend-diactoros/pull/290) fixes Chris@13: `Stream::getSize()` such that it checks that the result of `fstat` was Chris@13: succesful before attempting to return its `size` member; in the case of an Chris@13: error, it now returns `null`. Chris@13: Chris@12: ## 1.7.0 - 2018-01-04 Chris@12: Chris@12: ### Added Chris@12: Chris@12: - [#285](https://github.com/zendframework/zend-diactoros/pull/285) adds a new Chris@12: custom response type, `Zend\Diactoros\Response\XmlResponse`, for generating Chris@12: responses representing XML. Usage is the same as with the `HtmlResponse` or Chris@12: `TextResponse`; the response generated will have a `Content-Type: Chris@12: application/xml` header by default. Chris@12: Chris@12: - [#280](https://github.com/zendframework/zend-diactoros/pull/280) adds the Chris@12: response status code/phrase pairing "103 Early Hints" to the Chris@12: `Response::$phrases` property. This is a new status proposed via Chris@12: [RFC 8297](https://datatracker.ietf.org/doc/rfc8297/). Chris@12: Chris@12: - [#279](https://github.com/zendframework/zend-diactoros/pull/279) adds explicit Chris@12: support for PHP 7.2; previously, we'd allowed build failures, though none Chris@12: occured; we now require PHP 7.2 builds to pass. Chris@12: Chris@12: ### Changed Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Deprecated Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Removed Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Fixed Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ## 1.6.1 - 2017-10-12 Chris@12: Chris@12: ### Added Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Changed Chris@12: Chris@12: - [#273](https://github.com/zendframework/zend-diactoros/pull/273) updates each Chris@12: of the SAPI emitter implementations to emit the status line after emitting Chris@12: other headers; this is done to ensure that the status line is not overridden Chris@12: by PHP. Chris@12: Chris@12: ### Deprecated Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Removed Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Fixed Chris@12: Chris@12: - [#273](https://github.com/zendframework/zend-diactoros/pull/273) modifies how Chris@12: the `SapiEmitterTrait` calls `header()` to ensure that a response code is Chris@12: _always_ passed as the third argument; this is done to prevent PHP from Chris@12: silently overriding it. Chris@12: Chris@12: ## 1.6.0 - 2017-09-13 Chris@12: Chris@12: ### Added Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Changed Chris@12: Chris@12: - [#270](https://github.com/zendframework/zend-diactoros/pull/270) changes the Chris@12: behavior of `Zend\Diactoros\Server`: it no longer creates an output buffer. Chris@12: Chris@12: - [#270](https://github.com/zendframework/zend-diactoros/pull/270) changes the Chris@12: behavior of the two SAPI emitters in two backwards-incompatible ways: Chris@12: Chris@12: - They no longer auto-inject a `Content-Length` header. If you need this Chris@12: functionality, zendframework/zend-expressive-helpers 4.1+ provides it via Chris@12: `Zend\Expressive\Helper\ContentLengthMiddleware`. Chris@12: Chris@12: - They no longer flush the output buffer. Instead, if headers have been sent, Chris@12: or the output buffer exists and has a non-zero length, the emitters raise an Chris@12: exception, as mixed PSR-7/output buffer content creates a blocking issue. Chris@12: If you are emitting content via `echo`, `print`, `var_dump`, etc., or not Chris@12: catching PHP errors or exceptions, you will need to either fix your Chris@12: application to always work with a PSR-7 response, or provide your own Chris@12: emitters that allow mixed output mechanisms. Chris@12: Chris@12: ### Deprecated Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Removed Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Fixed Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ## 1.5.0 - 2017-08-22 Chris@12: Chris@12: ### Added Chris@12: Chris@12: - [#205](https://github.com/zendframework/zend-diactoros/pull/205) adds support Chris@12: for PHP 7.2. Chris@12: Chris@12: - [#250](https://github.com/zendframework/zend-diactoros/pull/250) adds a new Chris@12: API to `JsonResponse` to avoid the need for decoding the response body in Chris@12: order to make changes to the underlying content. New methods include: Chris@12: - `getPayload()`: retrieve the unencoded payload. Chris@12: - `withPayload($data)`: create a new instance with the given data. Chris@12: - `getEncodingOptions()`: retrieve the flags to use when encoding the payload Chris@12: to JSON. Chris@12: - `withEncodingOptions(int $encodingOptions)`: create a new instance that uses Chris@12: the provided flags when encoding the payload to JSON. Chris@12: Chris@12: ### Changed Chris@12: Chris@12: - [#249](https://github.com/zendframework/zend-diactoros/pull/249) changes the Chris@12: behavior of the various `Uri::with*()` methods slightly: if the value Chris@12: represents no change, these methods will return the same instance instead of a Chris@12: new one. Chris@12: Chris@12: - [#248](https://github.com/zendframework/zend-diactoros/pull/248) changes the Chris@12: behavior of `Uri::getUserInfo()` slightly: it now (correctly) returns the Chris@12: percent-encoded values for the user and/or password, per RFC 3986 Section Chris@12: 3.2.1. `withUserInfo()` will percent-encode values, using a mechanism that Chris@12: prevents double-encoding. Chris@12: Chris@12: - [#243](https://github.com/zendframework/zend-diactoros/pull/243) changes the Chris@12: exception messages thrown by `UploadedFile::getStream()` and `moveTo()` when Chris@12: an upload error exists to include details about the upload error. Chris@12: Chris@12: - [#233](https://github.com/zendframework/zend-diactoros/pull/233) adds a new Chris@12: argument to `SapiStreamEmitter::emit`, `$maxBufferLevel` **between** the Chris@12: `$response` and `$maxBufferLength` arguments. This was done because the Chris@12: `Server::listen()` method passes only the response and `$maxBufferLevel` to Chris@12: emitters; previously, this often meant that streams were being chunked 2 bytes Chris@12: at a time versus the expected default of 8kb. Chris@12: Chris@12: If you were calling the `SapiStreamEmitter::emit()` method manually Chris@12: previously, you will need to update your code. Chris@12: Chris@12: ### Deprecated Chris@12: Chris@12: - Nothing. Chris@12: Chris@12: ### Removed Chris@12: Chris@12: - [#205](https://github.com/zendframework/zend-diactoros/pull/205) and Chris@12: [#243](https://github.com/zendframework/zend-diactoros/pull/243) **remove Chris@12: support for PHP versions prior to 5.6 as well as HHVM**. Chris@12: Chris@12: ### Fixed Chris@12: Chris@12: - [#248](https://github.com/zendframework/zend-diactoros/pull/248) fixes how the Chris@12: `Uri` class provides user-info within the URI authority; the value is now Chris@12: correctly percent-encoded , per RFC 3986 Section 3.2.1. Chris@12: Chris@0: ## 1.4.1 - 2017-08-17 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - [#260](https://github.com/zendframework/zend-diactoros/pull/260) removes Chris@0: support for HHVM, as tests have failed against it for some time. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#247](https://github.com/zendframework/zend-diactoros/pull/247) fixes the Chris@0: `Stream` and `RelativeStream` `__toString()` method implementations to check Chris@0: if the stream `isSeekable()` before attempting to `rewind()` it, ensuring that Chris@0: the method does not raise exceptions (PHP does not allow exceptions in that Chris@0: method). In particular, this fixes an issue when using AWS S3 streams. Chris@0: Chris@0: - [#252](https://github.com/zendframework/zend-diactoros/pull/252) provides a Chris@0: fix to the `SapiEmitterTrait` to ensure that any `Set-Cookie` headers in the Chris@0: response instance do not override those set by PHP when a session is created Chris@0: and/or regenerated. Chris@0: Chris@0: - [#257](https://github.com/zendframework/zend-diactoros/pull/257) provides a Chris@0: fix for the `PhpInputStream::read()` method to ensure string content that Chris@0: evaluates as empty (including `0`) is still cached. Chris@0: Chris@0: - [#258](https://github.com/zendframework/zend-diactoros/pull/258) updates the Chris@0: `Uri::filterPath()` method to allow parens within a URI path, per [RFC 3986 Chris@0: section 3.3](https://tools.ietf.org/html/rfc3986#section-3.3) (parens are Chris@0: within the character set "sub-delims"). Chris@0: Chris@0: ## 1.4.0 - 2017-04-06 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#219](https://github.com/zendframework/zend-diactoros/pull/219) adds two new Chris@0: classes, `Zend\Diactoros\Request\ArraySerializer` and Chris@0: `Zend\Diactoros\Response\ArraySerializer`. Each exposes the static methods Chris@0: `toArray()` and `fromArray()`, allowing de/serialization of messages from and Chris@0: to arrays. Chris@0: Chris@0: - [#236](https://github.com/zendframework/zend-diactoros/pull/236) adds two new Chris@0: constants to the `Response` class: `MIN_STATUS_CODE_VALUE` and Chris@0: `MAX_STATUS_CODE_VALUE`. Chris@0: Chris@0: ### Changes Chris@0: Chris@0: - [#240](https://github.com/zendframework/zend-diactoros/pull/240) changes the Chris@0: behavior of `ServerRequestFactory::fromGlobals()` when no `$cookies` argument Chris@0: is present. Previously, it would use `$_COOKIES`; now, if a `Cookie` header is Chris@0: present, it will parse and use that to populate the instance instead. Chris@0: Chris@0: This change allows utilizing cookies that contain period characters (`.`) in Chris@0: their names (PHP's built-in cookie handling renames these to replace `.` with Chris@0: `_`, which can lead to synchronization issues with clients). Chris@0: Chris@0: - [#235](https://github.com/zendframework/zend-diactoros/pull/235) changes the Chris@0: behavior of `Uri::__toString()` to better follow proscribed behavior in PSR-7. Chris@0: In particular, prior to this release, if a scheme was missing but an authority Chris@0: was present, the class was incorrectly returning a value that did not include Chris@0: a `//` prefix. As of this release, it now does this correctly. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ## 1.3.11 - 2017-04-06 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Changes Chris@0: Chris@0: - [#241](https://github.com/zendframework/zend-diactoros/pull/241) changes the Chris@0: constraint by which the package provides `psr/http-message-implementation` to Chris@0: simply `1.0` instead of `~1.0.0`, to follow how other implementations provide Chris@0: PSR-7. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#161](https://github.com/zendframework/zend-diactoros/pull/161) adds Chris@0: additional validations to header names and values to ensure no malformed values Chris@0: are provided. Chris@0: Chris@0: - [#234](https://github.com/zendframework/zend-diactoros/pull/234) fixes a Chris@0: number of reason phrases in the `Response` instance, and adds automation from Chris@0: the canonical IANA sources to ensure any new phrases added are correct. Chris@0: Chris@0: ## 1.3.10 - 2017-01-23 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#226](https://github.com/zendframework/zend-diactoros/pull/226) fixed an Chris@0: issue with the `SapiStreamEmitter` causing the response body to be cast Chris@0: to `(string)` and also be read as a readable stream, potentially producing Chris@0: double output. Chris@0: Chris@0: ## 1.3.9 - 2017-01-17 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#223](https://github.com/zendframework/zend-diactoros/issues/223) Chris@0: [#224](https://github.com/zendframework/zend-diactoros/pull/224) fixed an issue Chris@0: with the `SapiStreamEmitter` consuming too much memory when producing output Chris@0: for readable bodies. Chris@0: Chris@0: ## 1.3.8 - 2017-01-05 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#222](https://github.com/zendframework/zend-diactoros/pull/222) fixes the Chris@0: `SapiStreamEmitter`'s handling of the `Content-Range` header to properly only Chris@0: emit a range of bytes if the header value is in the form `bytes {first-last}/length`. Chris@0: This allows using other range units, such as `items`, without incorrectly Chris@0: emitting truncated content. Chris@0: Chris@0: ## 1.3.7 - 2016-10-11 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#208](https://github.com/zendframework/zend-diactoros/pull/208) adds several Chris@0: missing response codes to `Zend\Diactoros\Response`, including: Chris@0: - 226 ('IM used') Chris@0: - 308 ('Permanent Redirect') Chris@0: - 444 ('Connection Closed Without Response') Chris@0: - 499 ('Client Closed Request') Chris@0: - 510 ('Not Extended') Chris@0: - 599 ('Network Connect Timeout Error') Chris@0: - [#211](https://github.com/zendframework/zend-diactoros/pull/211) adds support Chris@0: for UTF-8 characters in query strings handled by `Zend\Diactoros\Uri`. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ## 1.3.6 - 2016-09-07 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#170](https://github.com/zendframework/zend-diactoros/pull/170) prepared Chris@0: documentation for publication at https://zendframework.github.io/zend-diactoros/ Chris@0: - [#165](https://github.com/zendframework/zend-diactoros/pull/165) adds support Chris@0: for Apache `REDIRECT_HTTP_*` header detection in the `ServerRequestFactory`. Chris@0: - [#166](https://github.com/zendframework/zend-diactoros/pull/166) adds support Chris@0: for UTF-8 characters in URI paths. Chris@0: - [#204](https://github.com/zendframework/zend-diactoros/pull/204) adds testing Chris@0: against PHP 7.1 release-candidate builds. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#186](https://github.com/zendframework/zend-diactoros/pull/186) fixes a typo Chris@0: in a variable name within the `SapiStreamEmitter`. Chris@0: - [#200](https://github.com/zendframework/zend-diactoros/pull/200) updates the Chris@0: `SapiStreamEmitter` to implement a check for `isSeekable()` prior to attempts Chris@0: to rewind; this allows it to work with non-seekable streams such as the Chris@0: `CallbackStream`. Chris@0: - [#169](https://github.com/zendframework/zend-diactoros/pull/169) ensures that Chris@0: response serialization always provides a `\r\n\r\n` sequence following the Chris@0: headers, even when no message body is present, to ensure it conforms with RFC Chris@0: 7230. Chris@0: - [#175](https://github.com/zendframework/zend-diactoros/pull/175) updates the Chris@0: `Request` class to set the `Host` header from the URI host if no header is Chris@0: already present. (Ensures conformity with PSR-7 specification.) Chris@0: - [#197](https://github.com/zendframework/zend-diactoros/pull/197) updates the Chris@0: `Uri` class to ensure that string serialization does not include a colon after Chris@0: the host name if no port is present in the instance. Chris@0: Chris@0: ## 1.3.5 - 2016-03-17 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#160](https://github.com/zendframework/zend-diactoros/pull/160) fixes HTTP Chris@0: protocol detection in the `ServerRequestFactory` to work correctly with HTTP/2. Chris@0: Chris@0: ## 1.3.4 - 2016-03-17 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#119](https://github.com/zendframework/zend-diactoros/pull/119) adds the 451 Chris@0: (Unavailable for Legal Reasons) status code to the `Response` class. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#117](https://github.com/zendframework/zend-diactoros/pull/117) provides Chris@0: validation of the HTTP protocol version. Chris@0: - [#127](https://github.com/zendframework/zend-diactoros/pull/127) now properly Chris@0: removes attributes with `null` values when calling `withoutAttribute()`. Chris@0: - [#132](https://github.com/zendframework/zend-diactoros/pull/132) updates the Chris@0: `ServerRequestFactory` to marshal the request path fragment, if present. Chris@0: - [#142](https://github.com/zendframework/zend-diactoros/pull/142) updates the Chris@0: exceptions thrown by `HeaderSecurity` to include the header name and/or Chris@0: value. Chris@0: - [#148](https://github.com/zendframework/zend-diactoros/pull/148) fixes several Chris@0: stream operations to ensure they raise exceptions when the internal pointer Chris@0: is at an invalid position. Chris@0: - [#151](https://github.com/zendframework/zend-diactoros/pull/151) ensures Chris@0: URI fragments are properly encoded. Chris@0: Chris@0: ## 1.3.3 - 2016-01-04 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#135](https://github.com/zendframework/zend-diactoros/pull/135) fixes the Chris@0: behavior of `ServerRequestFactory::marshalHeaders()` to no longer omit Chris@0: `Cookie` headers from the aggregated headers. While the values are parsed and Chris@0: injected into the cookie params, it's useful to have access to the raw headers Chris@0: as well. Chris@0: Chris@0: ## 1.3.2 - 2015-12-22 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#124](https://github.com/zendframework/zend-diactoros/pull/124) adds four Chris@0: more optional arguments to the `ServerRequest` constructor: Chris@0: - `array $cookies` Chris@0: - `array $queryParams` Chris@0: - `null|array|object $parsedBody` Chris@0: - `string $protocolVersion` Chris@0: `ServerRequestFactory` was updated to pass values for each of these parameters Chris@0: when creating an instance, instead of using the related `with*()` methods on Chris@0: an instance. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#122](https://github.com/zendframework/zend-diactoros/pull/122) updates the Chris@0: `ServerRequestFactory` to retrieve the HTTP protocol version and inject it in Chris@0: the generated `ServerRequest`, which previously was not performed. Chris@0: Chris@0: ## 1.3.1 - 2015-12-16 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#113](https://github.com/zendframework/zend-diactoros/pull/113) fixes an Chris@0: issue in the response serializer, ensuring that the status code in the Chris@0: deserialized response is an integer. Chris@0: - [#115](https://github.com/zendframework/zend-diactoros/pull/115) fixes an Chris@0: issue in the various text-basd response types (`TextResponse`, `HtmlResponse`, Chris@0: and `JsonResponse`); due to the fact that the constructor was not Chris@0: rewinding the message body stream, `getContents()` was thus returning `null`, Chris@0: as the pointer was at the end of the stream. The constructor now rewinds the Chris@0: stream after populating it in the constructor. Chris@0: Chris@0: ## 1.3.0 - 2015-12-15 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#110](https://github.com/zendframework/zend-diactoros/pull/110) adds Chris@0: `Zend\Diactoros\Response\SapiEmitterTrait`, which provides the following Chris@0: private method definitions: Chris@0: - `injectContentLength()` Chris@0: - `emitStatusLine()` Chris@0: - `emitHeaders()` Chris@0: - `flush()` Chris@0: - `filterHeader()` Chris@0: The `SapiEmitter` implementation has been updated to remove those methods and Chris@0: instead compose the trait. Chris@0: - [#111](https://github.com/zendframework/zend-diactoros/pull/111) adds Chris@0: a new emitter implementation, `SapiStreamEmitter`; this emitter type will Chris@0: loop through the stream instead of emitting it in one go, and supports content Chris@0: ranges. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ## 1.2.1 - 2015-12-15 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#101](https://github.com/zendframework/zend-diactoros/pull/101) fixes the Chris@0: `withHeader()` implementation to ensure that if the header existed previously Chris@0: but using a different casing strategy, the previous version will be removed Chris@0: in the cloned instance. Chris@0: - [#103](https://github.com/zendframework/zend-diactoros/pull/103) fixes the Chris@0: constructor of `Response` to ensure that null status codes are not possible. Chris@0: - [#99](https://github.com/zendframework/zend-diactoros/pull/99) fixes Chris@0: validation of header values submitted via request and response constructors as Chris@0: follows: Chris@0: - numeric (integer and float) values are now properly allowed (this solves Chris@0: some reported issues with setting Content-Length headers) Chris@0: - invalid header names (non-string values or empty strings) now raise an Chris@0: exception. Chris@0: - invalid individual header values (non-string, non-numeric) now raise an Chris@0: exception. Chris@0: Chris@0: ## 1.2.0 - 2015-11-24 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#88](https://github.com/zendframework/zend-diactoros/pull/88) updates the Chris@0: `SapiEmitter` to emit a `Content-Length` header with the content length as Chris@0: reported by the response body stream, assuming that Chris@0: `StreamInterface::getSize()` returns an integer. Chris@0: - [#77](https://github.com/zendframework/zend-diactoros/pull/77) adds a new Chris@0: response type, `Zend\Diactoros\Response\TextResponse`, for returning plain Chris@0: text responses. By default, it sets the content type to `text/plain; Chris@0: charset=utf-8`; per the other response types, the signature is `new Chris@0: TextResponse($text, $status = 200, array $headers = [])`. Chris@0: - [#90](https://github.com/zendframework/zend-diactoros/pull/90) adds a new Chris@0: `Zend\Diactoros\CallbackStream`, allowing you to back a stream with a PHP Chris@0: callable (such as a generator) to generate the message content. Its Chris@0: constructor accepts the callable: `$stream = new CallbackStream($callable);` Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#77](https://github.com/zendframework/zend-diactoros/pull/77) updates the Chris@0: `HtmlResponse` to set the charset to utf-8 by default (if no content type Chris@0: header is provided at instantiation). Chris@0: Chris@0: ## 1.1.4 - 2015-10-16 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#98](https://github.com/zendframework/zend-diactoros/pull/98) adds Chris@0: `JSON_UNESCAPED_SLASHES` to the default `json_encode` flags used by Chris@0: `Zend\Diactoros\Response\JsonResponse`. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#96](https://github.com/zendframework/zend-diactoros/pull/96) updates Chris@0: `withPort()` to allow `null` port values (indicating usage of default for Chris@0: the given scheme). Chris@0: - [#91](https://github.com/zendframework/zend-diactoros/pull/91) fixes the Chris@0: logic of `withUri()` to do a case-insensitive check for an existing `Host` Chris@0: header, replacing it with the new one. Chris@0: Chris@0: ## 1.1.3 - 2015-08-10 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#73](https://github.com/zendframework/zend-diactoros/pull/73) adds caching of Chris@0: the vendor directory to the Travis-CI configuration, to speed up builds. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#71](https://github.com/zendframework/zend-diactoros/pull/71) fixes the Chris@0: docblock of the `JsonResponse` constructor to typehint the `$data` argument Chris@0: as `mixed`. Chris@0: - [#73](https://github.com/zendframework/zend-diactoros/pull/73) changes the Chris@0: behavior in `Request` such that if it marshals a stream during instantiation, Chris@0: the stream is marked as writeable (specifically, mode `wb+`). Chris@0: - [#85](https://github.com/zendframework/zend-diactoros/pull/85) updates the Chris@0: behavior of `Zend\Diactoros\Uri`'s various `with*()` methods that are Chris@0: documented as accepting strings to raise exceptions on non-string input. Chris@0: Previously, several simply passed non-string input on verbatim, others Chris@0: normalized the input, and a few correctly raised the exceptions. Behavior is Chris@0: now consistent across each. Chris@0: - [#87](https://github.com/zendframework/zend-diactoros/pull/87) fixes Chris@0: `UploadedFile` to ensure that `moveTo()` works correctly in non-SAPI Chris@0: environments when the file provided to the constructor is a path. Chris@0: Chris@0: ## 1.1.2 - 2015-07-12 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#67](https://github.com/zendframework/zend-diactoros/pull/67) ensures that Chris@0: the `Stream` class only accepts `stream` resources, not any resource. Chris@0: Chris@0: ## 1.1.1 - 2015-06-25 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#64](https://github.com/zendframework/zend-diactoros/pull/64) fixes the Chris@0: behavior of `JsonResponse` with regards to serialization of `null` and scalar Chris@0: values; the new behavior is to serialize them verbatim, without any casting. Chris@0: Chris@0: ## 1.1.0 - 2015-06-24 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#52](https://github.com/zendframework/zend-diactoros/pull/52), Chris@0: [#58](https://github.com/zendframework/zend-diactoros/pull/58), Chris@0: [#59](https://github.com/zendframework/zend-diactoros/pull/59), and Chris@0: [#61](https://github.com/zendframework/zend-diactoros/pull/61) create several Chris@0: custom response types for simplifying response creation: Chris@0: Chris@0: - `Zend\Diactoros\Response\HtmlResponse` accepts HTML content via its Chris@0: constructor, and sets the `Content-Type` to `text/html`. Chris@0: - `Zend\Diactoros\Response\JsonResponse` accepts data to serialize to JSON via Chris@0: its constructor, and sets the `Content-Type` to `application/json`. Chris@0: - `Zend\Diactoros\Response\EmptyResponse` allows creating empty, read-only Chris@0: responses, with a default status code of 204. Chris@0: - `Zend\Diactoros\Response\RedirectResponse` allows specifying a URI for the Chris@0: `Location` header in the constructor, with a default status code of 302. Chris@0: Chris@0: Each also accepts an optional status code, and optional headers (which can Chris@0: also be used to provide an alternate `Content-Type` in the case of the HTML Chris@0: and JSON responses). Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - [#43](https://github.com/zendframework/zend-diactoros/pull/43) removed both Chris@0: `ServerRequestFactory::marshalUri()` and `ServerRequestFactory::marshalHostAndPort()`, Chris@0: which were deprecated prior to the 1.0 release. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#29](https://github.com/zendframework/zend-diactoros/pull/29) fixes request Chris@0: method validation to allow any valid token as defined by [RFC Chris@0: 7230](http://tools.ietf.org/html/rfc7230#appendix-B). This allows usage of Chris@0: custom request methods, vs a static, hard-coded list. Chris@0: Chris@0: ## 1.0.5 - 2015-06-24 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#60](https://github.com/zendframework/zend-diactoros/pull/60) fixes Chris@0: the behavior of `UploadedFile` when the `$errorStatus` provided at Chris@0: instantiation is not `UPLOAD_ERR_OK`. Prior to the fix, an Chris@0: `InvalidArgumentException` would occur at instantiation due to the fact that Chris@0: the upload file was missing or invalid. With the fix, no exception is raised Chris@0: until a call to `moveTo()` or `getStream()` is made. Chris@0: Chris@0: ## 1.0.4 - 2015-06-23 Chris@0: Chris@0: This is a security release. Chris@0: Chris@0: A patch has been applied to `Zend\Diactoros\Uri::filterPath()` that ensures that Chris@0: paths can only begin with a single leading slash. This prevents the following Chris@0: potential security issues: Chris@0: Chris@0: - XSS vectors. If the URI path is used for links or form targets, this prevents Chris@0: cases where the first segment of the path resembles a domain name, thus Chris@0: creating scheme-relative links such as `//example.com/foo`. With the patch, Chris@0: the leading double slash is reduced to a single slash, preventing the XSS Chris@0: vector. Chris@0: - Open redirects. If the URI path is used for `Location` or `Link` headers, Chris@0: without a scheme and authority, potential for open redirects exist if clients Chris@0: do not prepend the scheme and authority. Again, preventing a double slash Chris@0: corrects the vector. Chris@0: Chris@0: If you are using `Zend\Diactoros\Uri` for creating links, form targets, or Chris@0: redirect paths, and only using the path segment, we recommend upgrading Chris@0: immediately. Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#25](https://github.com/zendframework/zend-diactoros/pull/25) adds Chris@0: documentation. Documentation is written in markdown, and can be converted to Chris@0: HTML using [bookdown](http://bookdown.io). New features now MUST include Chris@0: documentation for acceptance. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#51](https://github.com/zendframework/zend-diactoros/pull/51) fixes Chris@0: `MessageTrait::getHeaderLine()` to return an empty string instead of `null` if Chris@0: the header is undefined (which is the behavior specified in PSR-7). Chris@0: - [#57](https://github.com/zendframework/zend-diactoros/pull/57) fixes the Chris@0: behavior of how the `ServerRequestFactory` marshals upload files when they are Chris@0: represented as a nested associative array. Chris@0: - [#49](https://github.com/zendframework/zend-diactoros/pull/49) provides several Chris@0: fixes that ensure that Diactoros complies with the PSR-7 specification: Chris@0: - `MessageInterface::getHeaderLine()` MUST return a string (that string CAN be Chris@0: empty). Previously, Diactoros would return `null`. Chris@0: - If no `Host` header is set, the `$preserveHost` flag MUST be ignored when Chris@0: calling `withUri()` (previously, Diactoros would not set the `Host` header Chris@0: if `$preserveHost` was `true`, but no `Host` header was present). Chris@0: - The request method MUST be a string; it CAN be empty. Previously, Diactoros Chris@0: would return `null`. Chris@0: - The request MUST return a `UriInterface` instance from `getUri()`; that Chris@0: instance CAN be empty. Previously, Diactoros would return `null`; now it Chris@0: lazy-instantiates an empty `Uri` instance on initialization. Chris@0: - [ZF2015-05](http://framework.zend.com/security/advisory/ZF2015-05) was Chris@0: addressed by altering `Uri::filterPath()` to prevent emitting a path prepended Chris@0: with multiple slashes. Chris@0: Chris@0: ## 1.0.3 - 2015-06-04 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#48](https://github.com/zendframework/zend-diactoros/pull/48) drops the Chris@0: minimum supported PHP version to 5.4, to allow an easier upgrade path for Chris@0: Symfony 2.7 users, and potential Drupal 8 usage. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ## 1.0.2 - 2015-06-04 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#27](https://github.com/zendframework/zend-diactoros/pull/27) adds phonetic Chris@0: pronunciation of "Diactoros" to the README file. Chris@0: - [#36](https://github.com/zendframework/zend-diactoros/pull/36) adds property Chris@0: annotations to the class-level docblock of `Zend\Diactoros\RequestTrait` to Chris@0: ensure properties inherited from the `MessageTrait` are inherited by Chris@0: implementations. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: - Chris@0: ### Fixed Chris@0: Chris@0: - [#41](https://github.com/zendframework/zend-diactoros/pull/41) fixes the Chris@0: namespace for test files to begin with `ZendTest` instead of `Zend`. Chris@0: - [#46](https://github.com/zendframework/zend-diactoros/pull/46) ensures that Chris@0: the cookie and query params for the `ServerRequest` implementation are Chris@0: initialized as arrays. Chris@0: - [#47](https://github.com/zendframework/zend-diactoros/pull/47) modifies the Chris@0: internal logic in `HeaderSecurity::isValid()` to use a regular expression Chris@0: instead of character-by-character comparisons, improving performance. Chris@0: Chris@0: ## 1.0.1 - 2015-05-26 Chris@0: Chris@0: ### Added Chris@0: Chris@0: - [#10](https://github.com/zendframework/zend-diactoros/pull/10) adds Chris@0: `Zend\Diactoros\RelativeStream`, which will return stream contents relative to Chris@0: a given offset (i.e., a subset of the stream). `AbstractSerializer` was Chris@0: updated to create a `RelativeStream` when creating the body of a message, Chris@0: which will prevent duplication of the stream in-memory. Chris@0: - [#21](https://github.com/zendframework/zend-diactoros/pull/21) adds a Chris@0: `.gitattributes` file that excludes directories and files not needed for Chris@0: production; this will further minify the package for production use cases. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - [#9](https://github.com/zendframework/zend-diactoros/pull/9) ensures that Chris@0: attributes are initialized to an empty array, ensuring that attempts to Chris@0: retrieve single attributes when none are defined will not produce errors. Chris@0: - [#14](https://github.com/zendframework/zend-diactoros/pull/14) updates Chris@0: `Zend\Diactoros\Request` to use a `php://temp` stream by default instead of Chris@0: `php://memory`, to ensure requests do not create an out-of-memory condition. Chris@0: - [#15](https://github.com/zendframework/zend-diactoros/pull/15) updates Chris@0: `Zend\Diactoros\Stream` to ensure that write operations trigger an exception Chris@0: if the stream is not writeable. Additionally, it adds more robust logic for Chris@0: determining if a stream is writeable. Chris@0: Chris@0: ## 1.0.0 - 2015-05-21 Chris@0: Chris@0: First stable release, and first release as `zend-diactoros`. Chris@0: Chris@0: ### Added Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Deprecated Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Removed Chris@0: Chris@0: - Nothing. Chris@0: Chris@0: ### Fixed Chris@0: Chris@0: - Nothing.