Releases: guzzle/psr7
Releases · guzzle/psr7
1.8.0
See change log for changes.
1.7.0
See change log for changes.
Revert PSR-7 type assertions
1.6.0 introduced a few type assertions to enforce types defined by PSR-7. Unfortunately that break the library for users not strictly following the PSR-7 standard. Since the users impacted by this change seems to be rather large, this hotfix reverts that change with the note that we will reapply it in 2.0.0, so fixing this is recommended regardless of which version you use.
1.6.0
Version 1.6.0 is released which will likely be the last minor release in 1.x. We're focussing 2.0 now with support for psr/http-factory, PHP 7.2 requirement and type declarations.
Added
- Allowed version
^3.0
ofralouphie/getallheaders
dependency (#244) - Added MIME type for WEBP image format (#246)
- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
Changed
- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
- Accept port number 0 to be valid (#270)
Fixed
1.5.0
After a really long waiting period, 1.5.0 is finally here with the following changes:
Added
- Response first-line to response string exception (fixes #145)
- A test for #129 behavior
get_message_body_summary
function in order to get the message summary3gp
andmkv
mime types
Changed
- Clarify exception message when stream is detached
Deprecated
- Deprecated parsing folded header lines as per RFC 7230
Fixed
- Fix
AppendStream::detach
to not close streams InflateStream
preservesisSeekable
attribute of the underlying streamServerRequest::getUriFromGlobals
to support URLs in query parameters
Several other fixes and improvements.
1.4.0
- Fix
Stream::read
when length parameter <= 0. copy_to_stream
reads bytes in chunks instead ofmaxLen
into memory.- Fix
ServerRequest::getUriFromGlobals
whenHost
header contains port. - Ensure
ServerRequest::getUriFromGlobals
returns a URI in absolute form. - Allow
parse_response
to parse a response without delimiting space and reason. - Ensure each URI modification results in a valid URI according to PSR-7 discussions.
Invalid modifications will throw an exception instead of returning a wrong URI or
doing some magic.(new Uri)->withPath('foo')->withHost('example.com')
will throw an exception
because the path of a URI with an authority must start with a slash "/" or be empty(new Uri())->withScheme('http')
will return'http://localhost'
- Fix compatibility of URIs with
file
scheme and empty host. - Added common URI utility methods based on RFC 3986 (see documentation in the readme):
Uri::isDefaultPort
Uri::isAbsolute
Uri::isNetworkPathReference
Uri::isAbsolutePathReference
Uri::isRelativePathReference
Uri::isSameDocumentReference
Uri::composeComponents
UriNormalizer::normalize
UriNormalizer::isEquivalent
UriResolver::relativize
- Deprecated
Uri::resolve
in favor ofUriResolver::resolve
- Deprecated
Uri::removeDotSegments
in favor ofUriResolver::removeDotSegments
1.3.1
- Fix
Uri::__toString
for network path references, e.g.//example.org
. - Fix missing lowercase normalization for host.
- Fix handling of URI components in case they are
'0'
in a lot of places,
e.g. as a user info password. - Fix
Uri::withAddedHeader
to correctly merge headers with different case. - Fix trimming of header values in
Uri::withAddedHeader
. Header values may
be surrounded by whitespace which should be ignored according to RFC 7230
Section 3.2.4. This does not apply to header names. - Fix
Uri::withAddedHeader
with an array of header values. - Fix
Uri::resolve
when base path has no slash and handling of fragment. - Fix handling of encoding in
Uri::with(out)QueryValue
so one can pass the
key/value both in encoded as well as decoded form to those methods. This is
consistent with withPath, withQuery etc. - Fix
ServerRequest::withoutAttribute
when attribute value is null.