Laminas Diactoros v1.5.0 Release Notes

Release Date: 2017-08-22 // over 4 years ago
  • โž• Added

    • ๐Ÿ‘ zendframework/zend-diactoros#205 adds support for PHP 7.2.

    • zendframework/zend-diactoros#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

    • zendframework/zend-diactoros#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.

    • zendframework/zend-diactoros#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.

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

    • zendframework/zend-diactoros#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

    ๐Ÿ›  Fixed

    • ๐Ÿ›  zendframework/zend-diactoros#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.