guzzlehttp/psr7
PSR-7 message implementation that also provides common utility methods
3.0.0
1.1B downloads/mo
#4 most downloaded on composer
guzzle/psr7
What this package is like to depend on
Last release 1 months ago
20 Jul 2026
Release timing varies
gaps range from 8 days to 8 months
Most releases are documented
notes for 59 of 66 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
68 releases · first in 2015
18 releases in the last 12 months
see the full history below
Release timeline
68 releases · May 2015 to Jul 2026Releases
latest 60 of 68-
3.0.020 Jul 2026Release notes
Open source →Added
- Add
DiagnosticValue::escape()to escape controls and malformed UTF-8 in diagnostics - Add
GuzzleHttp\Psr7\Exception\TimeoutExceptionfor timed-out stream operations - Add
GuzzleHttp\Psr7\Utils::redactUserInfoInString()to redact the userinfo of a raw URI string within text - Promote
GuzzleHttp\Psr7\Rfc3986to public API withisValid*()predicates andcanonicalizeIpv6() - Add
GuzzleHttp\Psr7\UriNormalizer::CANONICALIZE_IPV6_HOSTtoPRESERVING_NORMALIZATIONS
Changed
- Require
psr/http-message:^2.0and add native parameter and return types - Require
psr/http-factory:^1.1 - Reject native PHP serialization of stream implementations
- Preserve request method casing, except
ServerRequest::fromGlobals()still uppercases - Reject empty arrays and non-string values as header values
- Reject invalid uploaded file trees and invalid parsed body values
- Reject uploaded file specs missing
tmp_name,size, orerror - Reject non-integer and negative uploaded file
errorvalues - Reject invalid stream/upload sizes, buffer high-water marks, and dropping-stream limits
- Rewind seekable uploaded-file streams before copying in
UploadedFile::moveTo() - Reject negative
read()lengths across all stream implementations - Detect the
+flag anywhere in a mode forStream::isReadable()/isWritable() - Reject empty strings returned by
PumpStreamsource callables - Discard buffered bytes on
PumpStreamclose and detach - Restore the original stream position after
Message::bodySummary() - Allow
nullfor theMessage::bodySummary()truncation length to use the default - Validate
LimitStreamoffset/limit and track non-seekable offset by bytes skipped - Make
FnStreamclose and detach terminal, calling close callbacks at most once - Suppress exceptions from
FnStreamclose callbacks during destructor cleanup - Make
CachingStream::close()idempotent, preserving remote cleanup after detach - Do not move the
CachingStreamcursor when aSEEK_ENDtarget on an unknown-size stream is rejected - Normalize multiple leading slashes in
Uri::getPath()and origin-form request targets - Serialize authority-less
fileURIs with rootless paths without the//separator - Serialize authority-less
fileURIs with empty paths asfile:instead of the unparseablefile:// - Remove dot segments above the root per RFC 3986, prefixing authority-less
//paths with/. - Return a network-path reference from
UriResolver::relativize()when an empty-path target requires one - Stop returning an empty reference from
UriResolver::relativize()when it would inherit the base fragment - Stop throwing from
UriResolver::relativize()when an equal-path target's last path segment contains a colon - Harden URI host validation (delimiters, backslashes, IPv6, embedded ports); require schemes to start with a letter
- Validate
Uri::fromParts()ports instead of casting them - Treat ports 80 and 443 as defaults for the
wsandwssschemes - Use the
wsandwssdefault ports inUriComparator::isCrossOrigin()port comparisons - Redact all non-empty URI userinfo in
Utils::redactUserInfo() - Rebuild server request URIs from
$_SERVERbyREQUEST_METHOD, using target authority beforeSERVER_PORT - Remove userinfo from absolute-form
REQUEST_URItargets inServerRequest::fromGlobals() - Reject zero-port
HTTP_HOSTand malformedSERVER_PORTinServerRequest::getUriFromGlobals() - Reject malformed
REQUEST_METHODandSERVER_PROTOCOLserver values inServerRequest::fromGlobals() - Reject zero-port
Hostand normalize leading-zero ports inMessage::parseRequest() - Reject duplicate
Hostheaders and validate present values for all request-target forms - Reject zero-port, hostless, and userinfo absolute-form request targets in
Message::parseRequest() - Synchronize the
Hostheader inRequest::withUri()when the URI changes or Host is empty - Include the URI port in
Hostheaders synthesized byMessage::toString() - Validate the Host header synthesized by
Message::toString()from the request URI - Include non-default URI ports in
Hostheaders set byUtils::modifyRequest()URI changes - Accept
OPTIONS *andCONNECTauthority-form request targets inMessage::parseRequest() - Hide credential-bearing URI, server, and cookie arguments in stack traces on PHP 8.2+
- Reject malformed HTTP request/response start-lines
- Unfold obsolete HTTP/1.0 line folding for all valid request method tokens
- Reject empty and control-character request targets in
Request::withRequestTarget() - Validate iterator chunks passed to
Utils::streamFor() - Validate unsupported values passed to
Query::build() - Reject non-finite float values in
Query::build()andMultipartStreamcontents - Reject non-finite float values in iterator chunks passed to
Utils::streamFor() Utils::streamFor()now rejects non-string scalar bodiesUri::withQueryValues()now rejects non-string values- Reject invalid
Utils::modifyRequest()change values - Use PHP debug type names in type error messages
- Changed
Utils::copyToStream()to throw when destination streams cannot make progress - Throw
TimeoutExceptionfromStreamread/write andUtilscopy/hash/readLine on stream timeouts - Throw
TimeoutExceptionfromAppendStream::read(),CachingStream::read(), andUtils::tryGetContents()on stream timeouts - Re-throw
TimeoutExceptionfromInflateStreamwhen the decoded source stream times out - Close the compressed source stream from
InflateStream::close() - Return the number of bytes copied from
Utils::copyToStream() - Throw
OverflowExceptionwhen stream byte counts or offsets exceedPHP_INT_MAX - Translate
StreamWrapperruntime failures to PHP stream failure values - Stop adding default
Content-Lengthtomultipart/form-dataparts (RFC 7578 §4.8) - Escape multipart
Content-Dispositionparameters and reject unsafe boundaries and part headers - Preserve trailing whitespace in custom
MultipartStreampart header values - Preserve explicit custom
MultipartStreamboundary'0'instead of replacing it with a generated boundary - Made static utility classes non-instantiable
- Validate bracketed IP-literal hosts consistently between parsing and
withHost(), including userinfo forms - Percent-encode raw control bytes in userinfo before bracketed IP-literal hosts instead of parsing mutated values
- Reject invalid UTF-8 and preserve percent-sequences in userinfo before bracketed IP-literal hosts
- Normalize percent-encoded octets in the URI host to uppercase hex
- Canonicalize IPv6 hosts to RFC 5952 form in
Uriconstruction,fromParts(), andwithHost() - Canonicalize bracketed IPv6 hosts in
UriComparator::isCrossOrigin() - Reject malformed percent-sequences and percent-encoded bytes forbidden by the URI host policy
- Extend
CAPITALIZE_PERCENT_ENCODINGandDECODE_UNRESERVED_CHARACTERSto userinfo and host - Trim header list elements with only spaces, horizontal tabs, and line terminators in
Header::splitList() - Report header parameter PCRE failures explicitly in
Header::parse() - Escape controls and malformed UTF-8 consistently in generated exception messages
Removed
- Dropped support for PHP 7.2 and 7.3
- Removed the
ralouphie/getallheadersdependency - Removed deprecated
Header::normalize()method
Release notes
Open source →Added
- Add
DiagnosticValue::escape()to escape controls and malformed UTF-8 in diagnostics - Add
GuzzleHttp\Psr7\Exception\TimeoutExceptionfor timed-out stream operations - Add
GuzzleHttp\Psr7\Utils::redactUserInfoInString()to redact the userinfo of a raw URI string within text - Promote
GuzzleHttp\Psr7\Rfc3986to public API withisValid*()predicates andcanonicalizeIpv6() - Add
GuzzleHttp\Psr7\UriNormalizer::CANONICALIZE_IPV6_HOSTtoPRESERVING_NORMALIZATIONS
Changed
- Require
psr/http-message:^2.0and add native parameter and return types - Require
psr/http-factory:^1.1 - Reject native PHP serialization of stream implementations
- Preserve request method casing, except
ServerRequest::fromGlobals()still uppercases - Reject empty arrays and non-string values as header values
- Reject invalid uploaded file trees and invalid parsed body values
- Reject uploaded file specs missing
tmp_name,size, orerror - Reject non-integer and negative uploaded file
errorvalues - Reject invalid stream/upload sizes, buffer high-water marks, and dropping-stream limits
- Rewind seekable uploaded-file streams before copying in
UploadedFile::moveTo() - Reject negative
read()lengths across all stream implementations - Detect the
+flag anywhere in a mode forStream::isReadable()/isWritable() - Reject empty strings returned by
PumpStreamsource callables - Discard buffered bytes on
PumpStreamclose and detach - Restore the original stream position after
Message::bodySummary() - Allow
nullfor theMessage::bodySummary()truncation length to use the default - Validate
LimitStreamoffset/limit and track non-seekable offset by bytes skipped - Make
FnStreamclose and detach terminal, calling close callbacks at most once - Suppress exceptions from
FnStreamclose callbacks during destructor cleanup - Make
CachingStream::close()idempotent, preserving remote cleanup after detach - Do not move the
CachingStreamcursor when aSEEK_ENDtarget on an unknown-size stream is rejected - Normalize multiple leading slashes in
Uri::getPath()and origin-form request targets - Serialize authority-less
fileURIs with rootless paths without the//separator - Serialize authority-less
fileURIs with empty paths asfile:instead of the unparseablefile:// - Remove dot segments above the root per RFC 3986, prefixing authority-less
//paths with/. - Return a network-path reference from
UriResolver::relativize()when an empty-path target requires one - Stop returning an empty reference from
UriResolver::relativize()when it would inherit the base fragment - Stop throwing from
UriResolver::relativize()when an equal-path target's last path segment contains a colon - Harden URI host validation (delimiters, backslashes, IPv6, embedded ports); require schemes to start with a letter
- Validate
Uri::fromParts()ports instead of casting them - Treat ports 80 and 443 as defaults for the
wsandwssschemes - Use the
wsandwssdefault ports inUriComparator::isCrossOrigin()port comparisons - Redact all non-empty URI userinfo in
Utils::redactUserInfo() - Rebuild server request URIs from
$_SERVERbyREQUEST_METHOD, using target authority beforeSERVER_PORT - Remove userinfo from absolute-form
REQUEST_URItargets inServerRequest::fromGlobals() - Reject zero-port
HTTP_HOSTand malformedSERVER_PORTinServerRequest::getUriFromGlobals() - Reject malformed
REQUEST_METHODandSERVER_PROTOCOLserver values inServerRequest::fromGlobals() - Reject zero-port
Hostand normalize leading-zero ports inMessage::parseRequest() - Reject duplicate
Hostheaders and validate present values for all request-target forms - Reject zero-port, hostless, and userinfo absolute-form request targets in
Message::parseRequest() - Synchronize the
Hostheader inRequest::withUri()when the URI changes or Host is empty - Include the URI port in
Hostheaders synthesized byMessage::toString() - Validate the Host header synthesized by
Message::toString()from the request URI - Include non-default URI ports in
Hostheaders set byUtils::modifyRequest()URI changes - Accept
OPTIONS *andCONNECTauthority-form request targets inMessage::parseRequest() - Hide credential-bearing URI, server, and cookie arguments in stack traces on PHP 8.2+
- Reject malformed HTTP request/response start-lines
- Unfold obsolete HTTP/1.0 line folding for all valid request method tokens
- Reject empty and control-character request targets in
Request::withRequestTarget() - Validate iterator chunks passed to
Utils::streamFor() - Validate unsupported values passed to
Query::build() - Reject non-finite float values in
Query::build()andMultipartStreamcontents - Reject non-finite float values in iterator chunks passed to
Utils::streamFor() Utils::streamFor()now rejects non-string scalar bodiesUri::withQueryValues()now rejects non-string values- Reject invalid
Utils::modifyRequest()change values - Use PHP debug type names in type error messages
- Changed
Utils::copyToStream()to throw when destination streams cannot make progress - Throw
TimeoutExceptionfromStreamread/write andUtilscopy/hash/readLine on stream timeouts - Throw
TimeoutExceptionfromAppendStream::read(),CachingStream::read(), andUtils::tryGetContents()on stream timeouts - Re-throw
TimeoutExceptionfromInflateStreamwhen the decoded source stream times out - Close the compressed source stream from
InflateStream::close() - Return the number of bytes copied from
Utils::copyToStream() - Throw
OverflowExceptionwhen stream byte counts or offsets exceedPHP_INT_MAX - Translate
StreamWrapperruntime failures to PHP stream failure values - Stop adding default
Content-Lengthtomultipart/form-dataparts (RFC 7578 §4.8) - Escape multipart
Content-Dispositionparameters and reject unsafe boundaries and part headers - Preserve trailing whitespace in custom
MultipartStreampart header values - Preserve explicit custom
MultipartStreamboundary'0'instead of replacing it with a generated boundary - Made static utility classes non-instantiable
- Validate bracketed IP-literal hosts consistently between parsing and
withHost(), including userinfo forms - Percent-encode raw control bytes in userinfo before bracketed IP-literal hosts instead of parsing mutated values
- Reject invalid UTF-8 and preserve percent-sequences in userinfo before bracketed IP-literal hosts
- Normalize percent-encoded octets in the URI host to uppercase hex
- Canonicalize IPv6 hosts to RFC 5952 form in
Uriconstruction,fromParts(), andwithHost() - Canonicalize bracketed IPv6 hosts in
UriComparator::isCrossOrigin() - Reject malformed percent-sequences and percent-encoded bytes forbidden by the URI host policy
- Extend
CAPITALIZE_PERCENT_ENCODINGandDECODE_UNRESERVED_CHARACTERSto userinfo and host - Trim header list elements with only spaces, horizontal tabs, and line terminators in
Header::splitList() - Report header parameter PCRE failures explicitly in
Header::parse() - Escape controls and malformed UTF-8 consistently in generated exception messages
Removed
- Dropped support for PHP 7.2 and 7.3
- Removed the
ralouphie/getallheadersdependency - Removed deprecated
Header::normalize()method
- Add
-
2.13.016 Jul 2026Release notes
Open source →Added
- Add
Utils::asciiToLower,asciiToUpper,asciiUcFirst,caselessEquals,caselessContains
Changed
- Use locale-independent ASCII case folding everywhere case is normalized
- Trigger a runtime deprecation for previously deprecated functionality in 2.3.0
Release notes
Open source →Added
- Add
Utils::asciiToLower,asciiToUpper,asciiUcFirst,caselessEquals,caselessContains
Changed
- Use locale-independent ASCII case folding everywhere case is normalized
- Trigger a runtime deprecation for previously deprecated functionality in 2.3.0
- Add
-
2.12.513 Jul 2026Release notes
Open source →Fixed
- Compare header names and hosts with locale-independent ASCII lowercasing
- Compare hosts without locale sensitivity when detecting cross-origin redirects
Release notes
Open source →Fixed
- Compare header names and hosts with locale-independent ASCII lowercasing
- Compare hosts without locale sensitivity when detecting cross-origin redirects
-
2.12.408 Jul 2026Release notes
Open source →Changed
- Pass explicit trim characters ahead of the PHP 8.6 trim default change
Release notes
Open source →Changed
- Pass explicit trim characters ahead of the PHP 8.6 trim default change
Fixed
- Anchor server port and response start-line patterns to the true end of input
- Treat host-less origin-form request targets starting with
//as paths inMessage::parseRequest() - Reject raw DEL bytes in bracketed IP-literal hosts instead of parsing a mutated host
- Reject invalid bytes after a bracketed IP-literal host instead of reparsing a different host
-
2.12.323 Jun 2026Release notes
Open source →Security
- Validate the URI host so
getHost()matches the URI authority (GHSA-c2w2-prh8-qm98)
Release notes
Open source →Security
- Validate the URI host so
getHost()matches the URI authority (GHSA-c2w2-prh8-qm98)
- Validate the URI host so
-
2.12.223 Jun 2026Release notes
Open source →Fixed
- Report URI parsing, filtering, and normalization PCRE failures explicitly
- Report HTTP message parser PCRE failures explicitly
- Fail closed when PCRE validation fails for request targets and hosts
Release notes
Open source →Fixed
- Report URI parsing, filtering, and normalization PCRE failures explicitly
- Report HTTP message parser PCRE failures explicitly
- Fail closed when PCRE validation fails for request targets and hosts
-
2.12.118 Jun 2026Release notes
Open source →Security
- Reject CR/LF in HTTP method, protocol version, and reason phrase (GHSA-vm85-hxw5-5432)
Release notes
Open source →Security
- Reject CR/LF in HTTP method, protocol version, and reason phrase (GHSA-vm85-hxw5-5432)
-
2.12.016 Jun 2026Release notes
Open source →Deprecated
- Deprecated non-finite float values in
Query::build()that guzzlehttp/psr7 3.0 rejects - Deprecated non-finite float multipart contents that guzzlehttp/psr7 3.0 rejects
- Deprecated non-string scalar bodies in
Utils::streamFor(); cast them to a string for 3.0 - Deprecated non-string
Uri::withQueryValues()values; cast them to a string for 3.0
Release notes
Open source →Deprecated
- Deprecated non-finite float values in
Query::build()that guzzlehttp/psr7 3.0 rejects - Deprecated non-finite float multipart contents that guzzlehttp/psr7 3.0 rejects
- Deprecated non-string scalar bodies in
Utils::streamFor(); cast them to a string for 3.0 - Deprecated non-string
Uri::withQueryValues()values; cast them to a string for 3.0
- Deprecated non-finite float values in
-
2.11.112 Jun 2026Release notes
Open source →Fixed
- Fixed non-finite float values emitting coercion warnings on PHP 8.5
Release notes
Open source →Fixed
- Fixed non-finite float values emitting coercion warnings on PHP 8.5
-
2.11.002 Jun 2026Release notes
Open source →Changed
- Changed
Utils::modifyRequest()to reject conflicting URI andHostheader changes in the same call - Changed
Header::parse()to split semicolon-separated parameters without repeated regular expression lookaheads - Changed
UriComparator::isCrossOrigin()so only HTTP and HTTPS missing ports receive implicit default ports
Deprecated
- Deprecated invalid PSR-7 arguments that guzzlehttp/psr7 3.0 will require native types for
- Deprecated non-string header values that guzzlehttp/psr7 3.0 will reject
- Deprecated empty header value arrays that guzzlehttp/psr7 3.0 will reject
- Deprecated URI schemes that do not match guzzlehttp/psr7 3.0 syntax requirements
- Deprecated multipart boundary and custom part header metadata that guzzlehttp/psr7 3.0 will reject
- Deprecated reliance on automatic uppercasing of request methods; guzzlehttp/psr7 3.0 preserves method casing
- Deprecated invalid
Utils::modifyRequest()change values that guzzlehttp/psr7 3.0 will reject
Fixed
- Fixed
Utils::copyToStream()to retry short destination writes instead of dropping the unwritten remainder - Fixed
Header::parse()splitting of semicolon-separated parameters with escaped quotes
Release notes
Open source →Changed
- Changed
Utils::modifyRequest()to reject conflicting URI andHostheader changes in the same call - Changed
Header::parse()to split semicolon-separated parameters without repeated regular expression lookaheads - Changed
UriComparator::isCrossOrigin()so only HTTP and HTTPS missing ports receive implicit default ports
Deprecated
- Deprecated invalid PSR-7 arguments that guzzlehttp/psr7 3.0 will require native types for
- Deprecated non-string header values that guzzlehttp/psr7 3.0 will reject
- Deprecated empty header value arrays that guzzlehttp/psr7 3.0 will reject
- Deprecated URI schemes that do not match guzzlehttp/psr7 3.0 syntax requirements
- Deprecated multipart boundary and custom part header metadata that guzzlehttp/psr7 3.0 will reject
- Deprecated reliance on automatic uppercasing of request methods; guzzlehttp/psr7 3.0 preserves method casing
- Deprecated invalid
Utils::modifyRequest()change values that guzzlehttp/psr7 3.0 will reject
Fixed
- Fixed
Utils::copyToStream()to retry short destination writes instead of dropping the unwritten remainder - Fixed
Header::parse()splitting of semicolon-separated parameters with escaped quotes
- Changed
-
2.10.429 May 2026Release notes
Open source →Fixed
- Apply
UriNormalizerpercent-encoding normalizations to URI fragments - Make
LimitStream::getSize()return0for slices past the underlying stream end - Make
AppendStream::read()return an empty string when no streams are attached - Make
CachingStream::read()throw on an incomplete cache-target write instead of silently corrupting replays - Prevent
CachingStream::seek()from looping indefinitely when the remote stream makes no progress
- Apply
-
2.10.327 May 2026Release notes
Open source →Fixed
- Fixed URI parsing for IPv6 literals containing embedded IPv4 addresses
- Fixed malformed UTF-8 URI strings being parsed as empty URIs
-
2.10.225 May 2026Release notes
Open source →Security
- Reject control and whitespace characters in URI host components (GHSA-hq7v-mx3g-29hw)
- Reject malformed Host values when constructing request URIs (GHSA-34xg-wgjx-8xph)
Fixed
- Make
ServerRequest::fromGlobals()robust against unexpected HTTP header value types in$_SERVER
-
2.10.120 May 2026 -
2.10.019 May 2026Release notes
Open source →Changed
- Harden
ServerRequest::fromGlobals()against malformed$_SERVERvalues - Prevent custom stream metadata from affecting internal size handling
- Throw when
StreamWrapper::getResource()cannot create a resource - Preserve custom request implementations in
Utils::modifyRequest() - Preserve custom URI implementations in
UriResolver::resolve() - Make
Uri::__toString()side-effect-free
- Harden
-
2.9.119 May 2026Release notes
Open source →Fixed
- Fix parsing of relative path references containing a colon in a non-initial path segment
- Fix
CachingStream::detach()returning an incomplete resource before the decorated stream has been fully read - Fix
Message::bodySummary()returningnullwhen truncating printable UTF-8 bodies inside a multibyte character
-
2.9.010 Mar 2026Release notes
Open source →Added
- Added nested array expansion support to
MultipartStream - Added
@return statictoMessageTraitmethods
Changed
- Updated MIME type mappings
- Added nested array expansion support to
-
2.8.110 Mar 2026Release notes
Open source →Fixed
- Encode
+signs inUri::withQueryValue()andUri::withQueryValues()to prevent them being interpreted as spaces
- Encode
-
2.8.023 Aug 2025 -
2.7.127 Mar 2025Release notes
Open source →Fixed
- Fixed uppercase IPv6 addresses in URI
Changed
- Improve uploaded file error message
-
2.7.018 Jul 2024Release notes
Open source →Added
- Add
Utils::redactUserInfo()method - Add ability to encode bools as ints in
Query::build
- Add
-
2.6.318 Jul 2024Release notes
Open source →Fixed
- Make
StreamWrapper::stream_stat()returnfalseif inner stream's size isnull
Changed
- PHP 8.4 support
- Make
-
2.6.203 Dec 2023Release notes
Open source →Fixed
- Fixed another issue with the fact that PHP transforms numeric strings in array keys to ints
Changed
- Updated links in docs to their canonical versions
- Replaced
call_user_func*with native calls
-
2.6.127 Aug 2023Release notes
Open source →Fixed
- Properly handle the fact that PHP transforms numeric strings in array keys to ints
-
2.6.003 Aug 2023Release notes
Open source →Changed
- Updated the mime type map to add some new entries, fix a couple of invalid entries, and remove an invalid entry
- Fallback to
application/octet-streamif we are unable to guess the content type for a multipart file upload
-
2.5.103 Aug 2023Release notes
Open source →Fixed
- Corrected mime type for
.accfiles toaudio/aac
Changed
- PHP 8.3 support
- Corrected mime type for
-
2.5.017 Apr 2023 -
2.4.517 Apr 2023Release notes
Open source →Fixed
- Prevent possible warnings on unset variables in
ServerRequest::normalizeNestedFileSpec - Fixed
Message::bodySummarywhenpreg_matchfails - Fixed header validation issue
- Prevent possible warnings on unset variables in
-
2.4.409 Mar 2023 -
2.4.326 Oct 2022 -
2.4.225 Oct 2022 -
2.4.128 Aug 2022 -
2.4.020 Jun 2022Release notes
Open source →Added
- Added provisional PHP 8.2 support
- Added
UriComparator::isCrossOriginmethod
-
2.3.009 Jun 2022Release notes
Open source →Fixed
- Added
Header::splitListmethod - Added
Utils::tryGetContentsmethod - Improved
Stream::getContentsmethod - Updated mimetype mappings
- Added
-
2.2.208 Jun 2022Release notes
Open source →Fixed
- Fix
Message::parseRequestUrifor numeric headers - Re-wrap exceptions thrown in
freadinto runtime exceptions - Throw an exception when multipart options is misformatted
- Fix
-
2.2.120 Mar 2022 -
2.2.020 Mar 2022Release notes
Open source →Added
- A more compressive list of mime types
- Add JsonSerializable to Uri
- Missing return types
Fixed
- Bug MultipartStream no
urimetadata - Bug MultipartStream with filename for
data://streams - Fixed new line handling in MultipartStream
- Reduced RAM usage when copying streams
- Updated parsing in
Header::normalize()
-
2.1.220 Mar 2022Nothing published for this version
-
2.1.120 Mar 2022 -
2.1.006 Oct 2021Release notes
Open source →Changed
- Attempting to create a
Uriobject from a malformed URI will no longer throw a genericInvalidArgumentException, but rather aMalformedUriException, which inherits from the former for backwards compatibility. Callers relying on the exception being thrown to detect invalid URIs should catch the new exception.
Fixed
- Return
nullin caching stream size if remote size isnull
- Attempting to create a
-
2.0.030 Jun 2021 -
2.0.0-rc129 Apr 2021 pre-releaseNothing published for this version
-
2.0.0-beta121 Mar 2021 pre-releaseNothing published for this version
-
1.9.117 Apr 2023Nothing published for this version
-
1.9.020 Jun 2022Nothing published for this version
-
1.8.520 Mar 2022Nothing published for this version
-
1.8.420 Mar 2022Nothing published for this version
-
1.8.305 Oct 2021Nothing published for this version
-
1.8.226 Apr 2021Nothing published for this version
-
1.8.121 Mar 2021Release notes
Open source →Fixed
- Issue parsing IPv6 URLs
- Issue modifying ServerRequest lost all its attributes
-
1.8.021 Mar 2021Release notes
Open source →Added
- Locale independent URL parsing
- Most classes got a
@finalannotation to prepare for 2.0
Fixed
- Issue when creating stream from
php://inputand curl-ext is not installed - Broken
Utils::tryFopen()on PHP 8
-
1.7.030 Sep 2020Release notes
Open source →Added
- Replaced functions by static methods
Fixed
- Converting a non-seekable stream to a string
- Handle multiple Set-Cookie correctly
- Ignore array keys in header values when merging
- Allow multibyte characters to be parsed in
Message:bodySummary()
Changed
- Restored partial HHVM 3 support
-
1.6.101 Jul 2019 -
1.6.030 Jun 2019Release notes
Open source →Added
- Allowed version
^3.0ofralouphie/getallheadersdependency (#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://inputin ServerRequest (#247) - Fixed readable/writable detection for certain stream modes (#248)
- Fixed encoding of special characters in the
userInfocomponent of an URI (#253)
- Allowed version
-
1.5.204 Dec 2018 -
1.5.104 Dec 2018 -
1.5.003 Dec 2018Release notes
Open source →Added
- Response first-line to response string exception (fixes #145)
- A test for #129 behavior
get_message_body_summaryfunction in order to get the message summary3gpandmkvmime types
Changed
- Clarify exception message when stream is detached
Deprecated
- Deprecated parsing folded header lines as per RFC 7230
Fixed
- Fix
AppendStream::detachto not close streams InflateStreampreservesisSeekableattribute of the underlying streamServerRequest::getUriFromGlobalsto support URLs in query parameters
Several other fixes and improvements.
-
1.4.220 Mar 2017Release notes
Open source →Fixed
- Reverted BC break to
Uri::resolveandUri::removeDotSegmentsby removing calls totrigger_errorwhen deprecated methods are invoked.
- Reverted BC break to
-
1.4.127 Feb 2017Release notes
Open source →Added
- Rriggering of silenced deprecation warnings.
Fixed
- Reverted BC break by reintroducing behavior to automagically fix a URI with a relative path and an authority by adding a leading slash to the path. It's only deprecated now.
-
1.4.021 Feb 2017Release notes
Open source →Added
- Added common URI utility methods based on RFC 3986 (see documentation in the readme):
Uri::isDefaultPortUri::isAbsoluteUri::isNetworkPathReferenceUri::isAbsolutePathReferenceUri::isRelativePathReferenceUri::isSameDocumentReferenceUri::composeComponentsUriNormalizer::normalizeUriNormalizer::isEquivalentUriResolver::relativize
Changed
- Ensure
ServerRequest::getUriFromGlobalsreturns a URI in absolute form. - Allow
parse_responseto 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'
Deprecated
Uri::resolvein favor ofUriResolver::resolveUri::removeDotSegmentsin favor ofUriResolver::removeDotSegments
Fixed
Stream::readwhen length parameter <= 0.copy_to_streamreads bytes in chunks instead ofmaxLeninto memory.ServerRequest::getUriFromGlobalswhenHostheader contains port.- Compatibility of URIs with
filescheme and empty host.
- Added common URI utility methods based on RFC 3986 (see documentation in the readme):