Changelog History
Page 3
-
v1.7.2 Changes
May 29, 2018โ Added
- Nothing.
๐ Changed
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- #301 adds stricter comparisons within the
uri
class to ensure non-empty values are not treated as empty.
-
v1.7.1 Changes
February 26, 2018โ Added
- Nothing.
๐ Changed
- โก๏ธ #293 updates
Uri::getHost()
to cast the value viastrtolower()
before returning it. While this represents a change, it is fixing a bug in our implementation: the PSR-7 specification for the method, which follows IETF RFC 3986 section 3.2.2, requires that the host name be normalized to lowercase.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ #290 fixes
Stream::getSize()
such that it checks that the result offstat
was succesful before attempting to return itssize
member; in the case of an error, it now returnsnull
.
-
v1.7.0 Changes
January 04, 2018โ Added
#285 adds a new custom response type,
Zend\Diactoros\Response\XmlResponse
, for generating responses representing XML. Usage is the same as with theHtmlResponse
orTextResponse
; the response generated will have aContent-Type: application/xml
header by default.#280 adds the response status code/phrase pairing "103 Early Hints" to the
Response::$phrases
property. This is a new status proposed via RFC 8297.#279 adds explicit support for PHP 7.2; previously, we'd allowed build failures, though none occured; we now require PHP 7.2 builds to pass.
๐ Changed
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- Nothing.
-
v1.6.1 Changes
October 12, 2017โ Added
- Nothing.
๐ Changed
- โก๏ธ #273 updates each of the SAPI emitter implementations to emit the status line after emitting other headers; this is done to ensure that the status line is not overridden by PHP.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- #273 modifies how
the
SapiEmitterTrait
callsheader()
to ensure that a response code is always passed as the third argument; this is done to prevent PHP from silently overriding it.
-
v1.6.0 Changes
September 13, 2017โ Added
- Nothing.
๐ Changed
#270 changes the behavior of
Zend\Diactoros\Server
: it no longer creates an output buffer.#270 changes the behavior of the two SAPI emitters in two backwards-incompatible ways:
- They no longer auto-inject a
Content-Length
header. If you need this functionality, zendframework/zend-expressive-helpers 4.1+ provides it viaZend\Expressive\Helper\ContentLengthMiddleware
. - They no longer flush the output buffer. Instead, if headers have been sent,
or the output buffer exists and has a non-zero length, the emitters raise an
exception, as mixed PSR-7/output buffer content creates a blocking issue.
If you are emitting content via
echo
,print
,var_dump
, etc., or not catching PHP errors or exceptions, you will need to either fix your application to always work with a PSR-7 response, or provide your own emitters that allow mixed output mechanisms.
- They no longer auto-inject a
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- Nothing.
-
v1.5.0 Changes
August 22, 2017โ 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()
andmoveTo()
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 theServer::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
- ๐ #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.
-
v1.4.1 Changes
August 17, 2017โ Added
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- ๐ #260 removes support for HHVM, as tests have failed against it for some time.
๐ Fixed
๐ #247 fixes the
Stream
andRelativeStream
__toString()
method implementations to check if the streamisSeekable()
before attempting torewind()
it, ensuring that the method does not raise exceptions (PHP does not allow exceptions in that method). In particular, this fixes an issue when using AWS S3 streams.#252 provides a fix to the
SapiEmitterTrait
to ensure that anySet-Cookie
headers in the response instance do not override those set by PHP when a session is created and/or regenerated.#257 provides a fix for the
PhpInputStream::read()
method to ensure string content that evaluates as empty (including0
) is still cached.โก๏ธ #258 updates the
Uri::filterPath()
method to allow parens within a URI path, per RFC 3986 section 3.3 (parens are within the character set "sub-delims").
-
v1.4.0 Changes
April 06, 2017โ Added
#219 adds two new classes,
Zend\Diactoros\Request\ArraySerializer
andZend\Diactoros\Response\ArraySerializer
. Each exposes the static methodstoArray()
andfromArray()
, allowing de/serialization of messages from and to arrays.#236 adds two new constants to the
Response
class:MIN_STATUS_CODE_VALUE
andMAX_STATUS_CODE_VALUE
.
๐ Changes
- #240 changes the
behavior of
ServerRequestFactory::fromGlobals()
when no$cookies
argument is present. Previously, it would use$_COOKIES
; now, if aCookie
header is present, it will parse and use that to populate the instance instead.
This change allows utilizing cookies that contain period characters (
.
) in their names (PHP's built-in cookie handling renames these to replace.
with_
, which can lead to synchronization issues with clients).- #235 changes the
behavior of
Uri::__toString()
to better follow proscribed behavior in PSR-7. In particular, prior to this release, if a scheme was missing but an authority was present, the class was incorrectly returning a value that did not include a//
prefix. As of this release, it now does this correctly.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- Nothing.
-
v1.3.11 Changes
April 06, 2017โ Added
- Nothing.
๐ Changes
- #241 changes the
constraint by which the package provides
psr/http-message-implementation
to simply1.0
instead of~1.0.0
, to follow how other implementations provide PSR-7.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
-
v1.3.10 Changes
January 23, 2017โ Added
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ #226 fixed an
issue with the
SapiStreamEmitter
causing the response body to be cast to(string)
and also be read as a readable stream, potentially producing double output.