Releases: guzzle/guzzle
Releases · guzzle/guzzle
Release list
8.0.2
Changed
- Adjusted
guzzlehttp/promisesversion constraint to^3.0.1
Fixed
- Fail a cURL multi handler wait with an attributable error when the transfer is no longer tracked
- Fix
StreamHandlerresolving numeric IPv4 hosts differently from cURL handlers on macOS and Windows - Fix
StreamHandlerTLS peer names and proxy authorities for numeric IPv4 hosts on all platforms - Settle a cURL multi handler transfer displaced by a request reusing its native handle ID
7.15.3
Changed
- Adjusted
guzzlehttp/promisesversion constraint to^2.5.2
Fixed
- Fail a cURL multi handler wait with an attributable error when the transfer is no longer tracked
- Fix
StreamHandlerresolving numeric IPv4 hosts differently from cURL handlers on macOS and Windows - Fix
StreamHandlerTLS peer names and proxy authorities for numeric IPv4 hosts on all platforms - Settle a cURL multi handler transfer displaced by a request reusing its native handle ID
8.0.1
Security
- Reject request URI hosts and
Hostheader values that are not printable ASCII (GHSA-v5mv-p594-2x33) - Reject URI hosts with a percent escape or that are not valid RFC 3986 hosts (GHSA-v5mv-p594-2x33)
- Reject numeric-looking URI hosts with trailing dots, read as IPv4 addresses (GHSA-v5mv-p594-2x33)
- Treat percent-escaped cookie domains as exact-match-only (GHSA-f7vp-7xgx-4w4r)
- Regenerate a derived
Hostheader after client URI rewrites (GHSA-v5mv-p594-2x33)
7.15.2
Security
- Reject non-printable-ASCII and percent-escaped URI hosts and
Hostheaders (GHSA-v5mv-p594-2x33) - Reject request URI hosts that contain a URI authority delimiter (GHSA-v5mv-p594-2x33)
- Reject numeric-looking URI hosts with trailing dots, read as IPv4 addresses (GHSA-v5mv-p594-2x33)
- Treat numeric-in-any-base and percent-escaped cookie domains as exact-match-only (GHSA-f7vp-7xgx-4w4r)
- Regenerate a derived
Hostheader after client URI rewrites (GHSA-v5mv-p594-2x33)
Fixed
- Preserve
RequestExceptionwhen the stream handler rejects a request before opening a stream
8.0.0
Added
- Add
SensitiveParametermetadata to credential-bearing parameters so PHP 8.2+ redacts their values in exception traces - Add HTTP/3 request support to the built-in cURL handlers when PHP 8.4+ and libcurl provide HTTP/3 support
- Add
Multiplexing::NONEsupport as a client, cURL multi handler, and conditional request option - Add generic and structured PHPDoc annotations to client request/config option, async promise, handler, middleware, pool, and mock handler APIs
- Add
ConnectTimeoutExceptionfor connect-phase timeouts, extendingConnectException - Add
NetworkExceptionfor no-response network failures - Add
NetworkTimeoutExceptionfor no-response transport timeouts - Add
ResponseTransferException, withResponseTimeoutExceptionfor response-transfer timeouts - Add PSR-17
request_factory,response_factory,stream_factory, anduri_factoryrequest options - Add explicit
close()lifecycle methods to the built-in cURL handlers and concrete cURL factory - Add
HandlerClosedExceptionfor pending transfers rejected byCurlMultiHandler::close() - Add persistent transport sharing modes (
TransportSharing::PERSISTENT_PREFERandTransportSharing::PERSISTENT_REQUIRE) - Add
ProxyOptionsfor proxy option resolution - Add
ResponseExceptionfor request failures with responses - Add auth middleware for built-in Basic and Digest authentication
Changed
- Canonicalize IPv6 hosts in Digest challenge cache keys
- Canonicalize IPv6 hosts in cookie domains, host-only identities, and domain matching
- Restrict cookie domain suffix matching to valid non-literal, nonnumeric host names
- Reject Secure cookies and insecure overlays received over insecure connections
- Enforce the
__Secure-and__Host-prefix requirements on response cookies - Hardened
FileCookieJarandSessionCookieJarpersistence against unsafe unserialization - Reject native PHP serialization of runtime objects
- Restrict persisted
FileCookieJarcookie files to owner-only permissions - Require persisted cookie data to use JSON lists and construct all records before changing the jar
- Normalize persistent cookie JSON failures as
RuntimeException - Moved the internal
Utilstime, timeout, IDN, and environment helpers to dedicated internal classes - Adjusted
guzzlehttp/promisesversion constraint to^3.0 - Adjusted
guzzlehttp/psr7version constraint to^3.0 - Quote multipart
Content-Typeboundary parameters when required - Added parameter and return types to
SetCookiemethods - Added native property types to supported public cURL handler state properties
- Added a
stringreturn type toSetCookie::__toString() - Validate proxy and no-proxy option types strictly across handlers
- Match leading-dot no-proxy entries against the bare domain and split string no-proxy lists on whitespace
- Validate
force_ip_resolve, protocols, anddelayranges at the client boundary - Treat a matching proxy
noentry as final even without a scheme-specific proxy entry - Validate proxy URLs in the built-in handlers and reject malformed or unsupported ones up front
- Default a port-less proxy to 1080 in the stream handler, matching libcurl
- Downgrade HTTP/3 requests to HTTP/2 or HTTP/1.1 when the proxy is resolved from environment variables
- Throw
RequestException, notInvalidArgumentException, for an unavailable proxy or TLS feature - Resolve proxy environment variables in the stream handler, consistent with the cURL handlers
- Honor
no_proxy/NO_PROXYfrom the environment in the stream handler, including*to disable proxying - Reject an environment-resolved
https://or SOCKS proxy in the stream handler, matching itsproxyoption behavior - Require cURL proxy header separation for first-class
Proxy-Authorizationon every route - Reject every first-class
Proxy-Authorizationfield, including empty, on stream proxies - Reject raw
CURLOPT_PROXYHEADERwithout proxy header separation support - Pass the request as the second argument to
on_headerscallbacks - Pass the
Pooliterable key as a trailing argument to per-request observer callbacks - Declare strict types across remaining source files
- Reject request option values that do not match their documented types
- Reject invalid
idn_conversion,retries, and built-in handleron_statsoption values before use - Reject non-finite floats in the
queryandform_paramsoptions - Reject non-string scalar values in the
bodyoption - Apply automatic
Expect: 100-Continueinjection to HTTP/1.1 requests only - Reject invalid
SetCookieconstructor field types instead of coercing them - Validate and normalize request framing across the built-in cURL and stream handlers
- Reject raw cURL request options outside the built-in cURL handlers' allow-list
- Reject non-string raw cURL header-list entries before applying them
- Reject proxy tunnels that require fresh connections when persistent transport sharing requires reuse
- Reject PHP stream context options outside the built-in stream handler allow-list
- Reject selected request options ignored by incompatible built-in handlers
- Treat only
nullas an omitted path or name when clearing cookies - Validate malformed
authrequest option arrays - Reject colons in built-in Basic usernames and ASCII control characters in Basic credentials
- Move built-in Basic and Digest authentication handling to the default auth middleware
- Reject unchallenged Digest probes for body-bearing requests instead of replaying the request unauthenticated
- Reject malformed Digest challenge parameter lists that libcurl's Digest parser may have tolerated
- Reuse Digest challenges to authorize subsequent body-less requests preemptively
- Advance the Digest nonce count when a stale challenge repeats the same nonce during the initial handshake
- Remove first-class NTLM authentication from the
authrequest option - Stop forwarding the generic
authrequest option when following cross-origin redirects - Limit the
Refererheader to the origin on cross-origin redirects - Follow only redirect status codes 301, 302, 303, 307, and 308
- Reject invalid
HandlerStack::remove()arguments - Require
Poolrequest collections to be iterable - Raised the built-in cURL handler floor to libcurl 7.34.0 with SSL support
- Store response cookies without a
Domainattribute as host-only cookies - Prefer cookie
Max-AgeoverExpireswhen both attributes are present - Match cookie names case-sensitively in
CookieJar::getCookieByName() - Ignore float-like or exponent
Max-Agecookie values instead of truncating them - Tighten invalid response handling and avoid exposing response-derived cURL stats
- Reject malformed response protocol versions and reason phrases
- Escape controls and malformed UTF-8 when copying raw values into exception messages
- Reject malformed or conflicting response
Content-Lengthand combinations withTransfer-Encoding - Expose raw stream-handler
Transfer-Encodingmetadata and coalesced framing inprogresson newer PHP - Wrap malformed redirect
Locationvalues inBadResponseException - Default HTTPS requests sent by the built-in cURL and stream handlers to TLS 1.2 or newer
- Apply the stream handler
crypto_methodoption through the SSL context so it consistently controls the minimum TLS version - Validate built-in handler timeout options before applying them
- Require a request when constructing
TransferExceptionand its subclasses - Classify empty, malformed, or handler-unsupported request protocol versions as request exceptions
- Classify additional cURL transport failures without a response as
NetworkException - Classify stream connect failures as
ConnectException, with connect timeouts asConnectTimeoutException - Classify stream transport failures without a response as
NetworkException, with timeouts asNetworkTimeoutException - Classify generic response-aware request failures as
ResponseException - Classify response-aware transfer failures as
ResponseTransferException - The stream handler returns an empty body and releases the connection at the end of the headers for HEAD and CONNECT-2xx exchanges and 1xx, 204, and 304 responses
- The stream handler no longer writes to the
sinkoption or reads trailing bytes for responses that cannot carry a body - Reject short buffered stream-handler bodies against
Content-Length, including decoded gzip/deflate - Normalize duplicate
Content-Lengthcasings and preserve encoded values on decoded responses - Reject unrepresentable byte counts and response sizes requiring integer bounds as
ResponseException - Ignore cURL informational responses other than
101 Switching Protocolsbefore the final response - Treat response sink rewind failures as
ResponseExceptionand skip non-seekable sink rewinds - Classify redirect request-body rewind failures as
ResponseException - Ignore stream source close failures after a complete response body transfer
- Throw
GuzzleHttp\Exception\InvalidArgumentExceptionfor invalid built-in handler options - Classify built-in cURL handle,
sink, and HTTP/3 setup failures asRequestException - Throw
ConnectTimeoutExceptionfor connect timeouts - Throw
NetworkTimeoutExceptionfor cURL no-response timeout errors - Throw
ResponseTimeoutExceptionfor response-aware transfer timeouts - Enforce the
timeoutoption as a total transfer deadline in the stream handler when it buffers the response - Reject stream handler responses whose header block arrives after the
timeoutdeadline - Stop consulting the
default_socket_timeoutini setting in the stream handler - Treat stream handler
read_timeoutas an idle timeout for every request stage, defaulting to 60 seconds - Default the cURL connect timeout to 60 seconds, with
connect_timeoutset to0disabling it - Stop the stream...
7.15.1
Security
- Preserve host-only cookie scope and require explicit persistence markers (GHSA-wm3w-8rrp-j577)
- Bound response cookie admission and generated
Cookieheaders (GHSA-f283-ghqc-fg79) - Exclude URI fragments from
Refererheaders generated for redirects (GHSA-h95v-h523-3mw8)
7.15.0
Added
- Added
Multiplexing::NONEsupport as a client, cURL multi handler, and conditional request option
Changed
- Adjusted
guzzlehttp/psr7version constraint to^2.13 - Use locale-independent ASCII folding for all case normalization and comparison
- Bound cURL upload reads to the declared
Content-Length - Sanitize the cURL error text exposed through exception handler context
- Fail closed when a named cURL multi connection cap cannot be applied
- Reject the request-level
CURLOPT_SHAREcURL option when named connection caps are configured - Strengthen old-libcurl SOCKS isolation for raw
CURLOPT_PRE_PROXYand opaque share handles - Isolate HTTP proxy tunnels from opaque shared connection caches
- Trigger runtime deprecations for previously deprecated functionality in 7.1.0
Deprecated
- Deprecated
Utils::jsonDecode()andUtils::jsonEncode()in favor of native JSON functions - Deprecated passing
CURLMOPT_PIPELININGin the cURL multi handleroptionsarray - Deprecated passing
CURLOPT_PROXYHEADERwithout cURL proxy header separation support
Fixed
- Defer cURL requests created from multi callbacks until native execution unwinds
- Fail synchronous waits from native cURL callbacks promptly instead of self-deadlocking
- Guard cURL multi handle removal against progress callbacks re-entering the handler
- Scope promise waits on the cURL multi handler to the awaited transfer
- Strip
Content-LengthandTransfer-Encodingwhen redirects discard the request body - Stop re-applying the
delayrequest option to followed redirects
7.14.2
Security
- Prevent first-class and proxy URL credentials from reaching origins (GHSA-94pj-82f3-465w)
7.14.1
Changed
- Adjusted
guzzlehttp/psr7version constraint to^2.12.5
Fixed
- Fail closed when a proxy tunnel isolation cURL option cannot be applied
- Normalize Stringable proxy credential values before computing connection-reuse section signatures
- Restore conservative credential redaction for unparseable proxies with multiple
@separators - Redact request URI credentials from the stream handler connection error message
- Reject enabled response streaming (
stream => true) on cap-configured stream handlers - Distinguish CurlMultiHandler and StreamHandler outcomes in connection-cap custom-handler guidance
- Reject raw cURL options that conflict with explicit multiplexing guarantees
- Stop explicit multiplexing conflict checks faulting on non-array cURL multi
optionsvalues - Reject required multiplexing when the final
CURLOPT_HTTPAUTHmask permits NTLM - Require an integer
CURLMOPT_PIPELININGwhen combined with explicit multiplexing - Check the required multiplexing cleartext proxy rule against the final cURL configuration
- Bound cURL multi handler blocking selects by the earliest pending request delay
- Stop synchronous cURL multi handler waits blocking on other transfers once the target has settled
- Stop cURL multi completion processing double-settling promises canceled from completion callbacks
- Run ready promise queue tasks before sleeping for delayed cURL multi requests
- Avoid integer overflow in cURL multi delay timing on 32-bit platforms
- Roll back failed cURL multi handle attachment instead of leaving requests pending
- Release the cURL easy handle when the
on_statscallback throws - Normalize response trailer field names to lowercase with values in wire order
- Retain response trailers only when an
on_trailerscallback is configured - Validate the
on_trailerscallback before starting a cURL transfer - Reject the
on_trailersrequest option on the stream handler, which cannot observe trailers - Match cookies, proxy schemes, auth types, and header names with locale-independent ASCII folding
- Reject proxy option values that Guzzle cannot classify identically to ext-curl
7.14.0
Added
- Added the
on_trailersrequest option to expose parsed HTTP response trailers - Added the
multiplexrequest option withMultiplexing::*modes to control or require HTTP/2 multiplexing - Added rejection of explicit
multiplexrequests whenCURLMOPT_PIPELININGdisables multiplexing - Added the
max_host_connectionsandmax_total_connectionsclient and cURL multi handler options
Changed
- Redirects that discard the request body no longer require it to be rewindable
- Synchronous cURL multi handler requests no longer wait for other queued transfers
- Section SOCKS proxy connections by credentials on libcurl before 7.69.0
- Reject request-level
CURLOPT_SHAREwhen combined with authenticated SOCKS proxy configuration - Redact proxy userinfo containing raw control bytes in cURL errors
- Check linked curl/libcurl NTLM support before applying NTLM auth
- Clarify that NTLM is deprecated by both Guzzle and curl/libcurl
- Remove deprecation for the raw cURL
CURLOPT_CERTINFOoption - Warn when a cURL multi option cannot be applied
Deprecated
- Deprecate the raw
CURLOPT_PIPEWAITcURL option in favour of themultiplexrequest option - Deprecate unknown handler constructor options
- Deprecate invalid
select_timeoutcURL multi handler option values - Deprecate raw cURL multi connection cap options in favour of the named options