All Versions
53
Latest Version
Avg Release Cycle
53 days
Latest Release
1760 days ago
Changelog History
Page 5
Changelog History
Page 5
-
v1.2.1 Changes
December 15, 2015โ Added
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ #101 fixes the
withHeader()
implementation to ensure that if the header existed previously but using a different casing strategy, the previous version will be removed in the cloned instance. - ๐ #103 fixes the
constructor of
Response
to ensure that null status codes are not possible. - ๐ #99 fixes
validation of header values submitted via request and response constructors as
follows:
- numeric (integer and float) values are now properly allowed (this solves some reported issues with setting Content-Length headers)
- invalid header names (non-string values or empty strings) now raise an exception.
- invalid individual header values (non-string, non-numeric) now raise an exception.
-
v1.2.0 Changes
November 24, 2015โ Added
- โก๏ธ #88 updates the
SapiEmitter
to emit aContent-Length
header with the content length as reported by the response body stream, assuming thatStreamInterface::getSize()
returns an integer. - #77 adds a new
response type,
Zend\Diactoros\Response\TextResponse
, for returning plain text responses. By default, it sets the content type totext/plain; charset=utf-8
; per the other response types, the signature isnew TextResponse($text, $status = 200, array $headers = [])
. - #90 adds a new
Zend\Diactoros\CallbackStream
, allowing you to back a stream with a PHP callable (such as a generator) to generate the message content. Its constructor accepts the callable:$stream = new CallbackStream($callable);
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- โก๏ธ #77 updates the
HtmlResponse
to set the charset to utf-8 by default (if no content type header is provided at instantiation).
- โก๏ธ #88 updates the
-
v1.1.4 Changes
October 16, 2015โ Added
- #98 adds
JSON_UNESCAPED_SLASHES
to the defaultjson_encode
flags used byZend\Diactoros\Response\JsonResponse
.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- #98 adds
-
v1.1.3 Changes
August 10, 2015โ Added
- #73 adds caching of the vendor directory to the Travis-CI configuration, to speed up builds.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ #71 fixes the
docblock of the
JsonResponse
constructor to typehint the$data
argument asmixed
. - #73 changes the
behavior in
Request
such that if it marshals a stream during instantiation, the stream is marked as writeable (specifically, modewb+
). - โก๏ธ #85 updates the
behavior of
Zend\Diactoros\Uri
's variouswith*()
methods that are documented as accepting strings to raise exceptions on non-string input. Previously, several simply passed non-string input on verbatim, others normalized the input, and a few correctly raised the exceptions. Behavior is now consistent across each. - ๐ #87 fixes
UploadedFile
to ensure thatmoveTo()
works correctly in non-SAPI environments when the file provided to the constructor is a path.
-
v1.1.2 Changes
July 12, 2015โ Added
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- #67 ensures that
the
Stream
class only acceptsstream
resources, not any resource.
-
v1.1.1 Changes
June 25, 2015โ Added
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ #64 fixes the
behavior of
JsonResponse
with regards to serialization ofnull
and scalar values; the new behavior is to serialize them verbatim, without any casting.
-
v1.1.0 Changes
June 24, 2015โ Added
#52, #58, #59, and #61 create several custom response types for simplifying response creation:
Zend\Diactoros\Response\HtmlResponse
accepts HTML content via its constructor, and sets theContent-Type
totext/html
.Zend\Diactoros\Response\JsonResponse
accepts data to serialize to JSON via its constructor, and sets theContent-Type
toapplication/json
.Zend\Diactoros\Response\EmptyResponse
allows creating empty, read-only responses, with a default status code of 204.Zend\Diactoros\Response\RedirectResponse
allows specifying a URI for theLocation
header in the constructor, with a default status code of 302.
Each also accepts an optional status code, and optional headers (which can also be used to provide an alternate
Content-Type
in the case of the HTML and JSON responses).๐ Deprecated
- Nothing.
โ Removed
- ๐ #43 removed both
ServerRequestFactory::marshalUri()
andServerRequestFactory::marshalHostAndPort()
, which were deprecated prior to the 1.0 release.
๐ Fixed
-
v1.0.5 Changes
June 24, 2015โ Added
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ #60 fixes
the behavior of
UploadedFile
when the$errorStatus
provided at instantiation is notUPLOAD_ERR_OK
. Prior to the fix, anInvalidArgumentException
would occur at instantiation due to the fact that the upload file was missing or invalid. With the fix, no exception is raised until a call tomoveTo()
orgetStream()
is made.
-
v1.0.4 Changes
June 23, 2015๐ This is a security release.
A patch has been applied to
Zend\Diactoros\Uri::filterPath()
that ensures that paths can only begin with a single leading slash. This prevents the following ๐ potential security issues:- XSS vectors. If the URI path is used for links or form targets, this prevents
cases where the first segment of the path resembles a domain name, thus
creating scheme-relative links such as
//example.com/foo
. With the patch, the leading double slash is reduced to a single slash, preventing the XSS vector. - Open redirects. If the URI path is used for
Location
orLink
headers, without a scheme and authority, potential for open redirects exist if clients do not prepend the scheme and authority. Again, preventing a double slash corrects the vector.
If you are using
Zend\Diactoros\Uri
for creating links, form targets, or โฌ๏ธ redirect paths, and only using the path segment, we recommend upgrading immediately.โ Added
- #25 adds documentation. Documentation is written in markdown, and can be converted to HTML using bookdown. New features now MUST include documentation for acceptance.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ #51 fixes
MessageTrait::getHeaderLine()
to return an empty string instead ofnull
if the header is undefined (which is the behavior specified in PSR-7). - ๐ #57 fixes the
behavior of how the
ServerRequestFactory
marshals upload files when they are represented as a nested associative array. - #49 provides several
fixes that ensure that Diactoros complies with the PSR-7 specification:
MessageInterface::getHeaderLine()
MUST return a string (that string CAN be empty). Previously, Diactoros would returnnull
.- If no
Host
header is set, the$preserveHost
flag MUST be ignored when callingwithUri()
(previously, Diactoros would not set theHost
header if$preserveHost
wastrue
, but noHost
header was present). - The request method MUST be a string; it CAN be empty. Previously, Diactoros
would return
null
. - The request MUST return a
UriInterface
instance fromgetUri()
; that instance CAN be empty. Previously, Diactoros would returnnull
; now it lazy-instantiates an emptyUri
instance on initialization.
- ๐ ZF2015-05 was
addressed by altering
Uri::filterPath()
to prevent emitting a path prepended with multiple slashes.
- XSS vectors. If the URI path is used for links or form targets, this prevents
cases where the first segment of the path resembles a domain name, thus
creating scheme-relative links such as
-
v1.0.3 Changes
June 04, 2015โ Added
- #48 drops the minimum supported PHP version to 5.4, to allow an easier upgrade path for Symfony 2.7 users, and potential Drupal 8 usage.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- Nothing.