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

zend-diactoros 1.5.0

Compare
Choose a tag to compare
@weierophinney weierophinney released this 22 Aug 20:41
· 436 commits to master since this release

Added

  • #205 adds support for PHP 7.2.

  • #250 adds a new API to JsonResponse to avoid the need for decoding the response body in order to make changes to the underlying content. New methods include:

    • getPayload(): retrieve the unencoded payload.
    • withPayload($data): create a new instance with the given data.
    • getEncodingOptions(): retrieve the flags to use when encoding the payload to JSON.
    • withEncodingOptions(int $encodingOptions): create a new instance that uses the provided flags when encoding the payload to JSON.

Changed

  • #249 changes the behavior of the various Uri::with*() methods slightly: if the value represents no change, these methods will return the same instance instead of a new one.

  • #248 changes the behavior of Uri::getUserInfo() slightly: it now (correctly) returns the percent-encoded values for the user and/or password, per RFC 3986 Section 3.2.1. withUserInfo() will percent-encode values, using a mechanism that prevents double-encoding.

  • #243 changes the exception messages thrown by UploadedFile::getStream() and moveTo() when an upload error exists to include details about the upload error.

  • #233 adds a new argument to SapiStreamEmitter::emit, $maxBufferLevel between the $response and $maxBufferLength arguments. This was done because the Server::listen() method passes only the response and $maxBufferLevel to emitters; previously, this often meant that streams were being chunked 2 bytes at a time versus the expected default of 8kb.

    If you were calling the SapiStreamEmitter::emit() method manually previously, you will need to update your code.

Deprecated

  • Nothing.

Removed

  • #205 and #243 remove support for PHP versions prior to 5.6 as well as HHVM.

Fixed

  • #248 fixes how the Uri class provides user-info within the URI authority; the value is now correctly percent-encoded , per RFC 3986 Section 3.2.1.