Skip to content

Releases: guzzle/psr7

Revert PSR-7 type assertions

01 Jul 23:25
239400d
Compare
Choose a tag to compare

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.

Details are in #282 and #283

1.6.0

30 Jun 00:37
Compare
Choose a tag to compare

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 of ralouphie/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

  • Fixed subsequent reads from php://input in ServerRequest (#247)
  • Fixed readable/writable detection for certain stream modes (#248)
  • Fixed encoding of special characters in the userInfo component of an URI (#253)

1.5.0

03 Dec 05:11
1.5.0
53662d6
Compare
Choose a tag to compare

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 summary
  • 3gp and mkv 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 preserves isSeekable attribute of the underlying stream
  • ServerRequest::getUriFromGlobals to support URLs in query parameters

Several other fixes and improvements.

1.4.0

21 Feb 01:29
Compare
Choose a tag to compare
  • Fix Stream::read when length parameter <= 0.
  • copy_to_stream reads bytes in chunks instead of maxLen into memory.
  • Fix ServerRequest::getUriFromGlobals when Host 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 of UriResolver::resolve
  • Deprecated Uri::removeDotSegments in favor of UriResolver::removeDotSegments

1.3.1

24 Jun 23:06
Compare
Choose a tag to compare
  • 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.

1.3.0

13 Apr 19:57
Compare
Choose a tag to compare
  • Added remaining interfaces needed for full PSR7 compatibility
    (ServerRequestInterface, UploadedFileInterface, etc.).
  • Added support for stream_for from scalars.
  • Can now extend Uri.
  • Fixed a bug in validating request methods by making it more permissive.

1.2.3

18 Feb 21:55
Compare
Choose a tag to compare
  • Fixed support in GuzzleHttp\Psr7\CachingStream for seeking forward on remote
    streams, which can sometimes return fewer bytes than requested with fread.
  • Fixed handling of gzipped responses with FNAME headers.

1.2.2

23 Jan 01:23
Compare
Choose a tag to compare
  • Added support for URIs without any authority.
  • Added support for HTTP 451 'Unavailable For Legal Reasons.'
  • Added support for using '0' as a filename.
  • Added support for including non-standard ports in Host headers.