* Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678)
* Fix various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
* Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
* Remove use of internal functions [#2548](https://github.com/guzzle/guzzle/pull/2548)
* idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489)
* Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454)
* IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424)
* Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
* Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
* Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
* Fix: `RetryMiddleware` did not do exponential delay between retries due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
Previously, `RetryMiddleware` would sleep for 1 millisecond, then 2 milliseconds, then 4 milliseconds.
**After this change, `RetryMiddleware` will sleep for 1 second, then 2 seconds, then 4 seconds.**
`Middleware::retry()` accepts a second callback parameter to override the default timeouts if needed.
* Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
* Deprecated `ClientInterface::VERSION`
* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108)
* Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081)
* Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161)
* Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163)
* Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242)
* Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284)
* Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273)
* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
* Fix: Default headers when decode_content is specified
* Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014)
* Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012)
* Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999)
* Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998)
* Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953)
* Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915)
* Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916)
+ Minor code cleanups, documentation fixes and clarifications.
* Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659)
* Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621)
* Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580)
* Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609)
* Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641)
* Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611)
* Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811)
* Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642)
* Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569)
* Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711)
* Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745)
* Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721)
* Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318)
* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684)
* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827)
+ Minor code cleanups, documentation fixes and clarifications.
* Fix deprecations with guzzle/psr7 version 1.4
* Allow to pass nullable Response to delay callable
* Only add scheme when host is present
* Fix drain case where content-length is the literal string zero
* Obfuscate in-URL credentials in exceptions
* Address HTTP_PROXY security vulnerability, CVE-2016-5385:
* Fixing timeout bug with StreamHandler:
https://github.com/guzzle/guzzle/pull/1488
* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when
a server does not honor `Connection: close`.
* Ignore URI fragment when sending requests.
* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`.
https://github.com/guzzle/guzzle/pull/1389
* Bug fix: Fix sleep calculation when waiting for delayed requests.
https://github.com/guzzle/guzzle/pull/1324
* Feature: More flexible history containers.
https://github.com/guzzle/guzzle/pull/1373
* Bug fix: defer sink stream opening in StreamHandler.
https://github.com/guzzle/guzzle/pull/1377
* Bug fix: do not attempt to escape cookie values.
https://github.com/guzzle/guzzle/pull/1406
* Feature: report original content encoding and length on decoded responses.
https://github.com/guzzle/guzzle/pull/1409
* Bug fix: rewind seekable request bodies before dispatching to cURL.
https://github.com/guzzle/guzzle/pull/1422
* Bug fix: provide an empty string to `http_build_query` for HHVM workaround.
https://github.com/guzzle/guzzle/pull/1367
* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler
https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4
* Feature: HandlerStack is now more generic.
https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e
* Bug fix: setting verify to false in the StreamHandler now disables peer
verification. https://github.com/guzzle/guzzle/issues/1256
* Feature: Middleware now uses an exception factory, including more error
context. https://github.com/guzzle/guzzle/pull/1282
* Feature: better support for disabled functions.
https://github.com/guzzle/guzzle/pull/1287
* Bug fix: fixed regression where MockHandler was not using `sink`.
https://github.com/guzzle/guzzle/pull/1292
* Feature: Added the `on_stats` request option to provide access to transfer
statistics for requests. https://github.com/guzzle/guzzle/pull/1202
* Feature: Added the ability to persist session cookies in CookieJars.
https://github.com/guzzle/guzzle/pull/1195
* Feature: Some compatibility updates for Google APP Engine
https://github.com/guzzle/guzzle/pull/1216
* Feature: Added support for NO_PROXY to prevent the use of a proxy based on
a simple set of rules. https://github.com/guzzle/guzzle/pull/1197
* Feature: Cookies can now contain square brackets.
https://github.com/guzzle/guzzle/pull/1237
* Bug fix: Now correctly parsing `=` inside of quotes in Cookies.
https://github.com/guzzle/guzzle/pull/1232
* Bug fix: Cusotm cURL options now correctly override curl options of the
same name. https://github.com/guzzle/guzzle/pull/1221
* Bug fix: Content-Type header is now added when using an explicitly provided
multipart body. https://github.com/guzzle/guzzle/pull/1218
* Bug fix: Now ignoring Set-Cookie headers that have no name.
* Bug fix: Reason phrase is no longer cast to an int in some cases in the
cURL handler. https://github.com/guzzle/guzzle/pull/1187
* Bug fix: Remove the Authorization header when redirecting if the Host
header changes. https://github.com/guzzle/guzzle/pull/1207
* Bug fix: Cookie path matching fixes
https://github.com/guzzle/guzzle/issues/1129
* Bug fix: Fixing the cURL `body_as_string` setting
https://github.com/guzzle/guzzle/pull/1201
* Bug fix: quotes are no longer stripped when parsing cookies.
https://github.com/guzzle/guzzle/issues/1172
* Bug fix: `form_params` and `query` now always uses the `&` separator.
https://github.com/guzzle/guzzle/pull/1163
* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set.
https://github.com/guzzle/guzzle/pull/1189
* Fixed a memory leak in the curl handlers in which references to callbacks
were not being removed by `curl_reset`.
* Cookies are now extracted properly before redirects.
* Cookies now allow more character ranges.
* Decoded Content-Encoding responses are now modified to correctly reflect
their state if the encoding was automatically removed by a handler. This
means that the `Content-Encoding` header may be removed an the
`Content-Length` modified to reflect the message size after removing the
* Added a more explicit error message when trying to use `form_params` and
`multipart` in the same request.
* Several fixes for HHVM support.
* Functions are now conditionally required using an additional level of
indirection to help with global Composer installations.
* Fixed a bug with serializing the `query` request option where the `&`
* Added a better error message for when `body` is provided as an array. Please
use `form_params` or `multipart` instead.
* See the UPGRADING.md document for more information.
* Added `multipart` and `form_params` request options.
* Added `synchronous` request option.
* Added the `on_headers` request option.
* Fixed `expect` handling.
* No longer adding default middlewares in the client ctor. These need to be
present on the provided handler in order to work.
* Requests are no longer initiated when sending async requests with the
CurlMultiHandler. This prevents unexpected recursion from requests completing
while ticking the cURL loop.
* Removed the semantics of setting `default` to `true`. This is no longer
required now that the cURL loop is not ticked for async requests.
* Added request and response logging middleware.
* No longer allowing self signed certificates when using the StreamHandler.
* Ensuring that `sink` is valid if saving to a file.
* Request exceptions now include a "handler context" which provides handler
specific contextual information.
* Added `GuzzleHttp\RequestOptions` to allow request options to be applied
* `$maxHandles` has been removed from CurlMultiHandler.
* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
* Mock now supports `save_to`
* Marked `AbstractRequestEvent::getTransaction()` as public.
* Fixed a bug in which multiple headers using different casing would overwrite
previous headers in the associative array.
* Added `Utils::getDefaultHandler()`
* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
* URL scheme is now always lowercased.
* Requires immutable messages, which basically means an event based system
owned by a request instance is no longer possible.
* Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7).
* Removed the dependency on `guzzlehttp/streams`. These stream abstractions
are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7`
* Added middleware and handler system
* Replaced the Guzzle event and subscriber system with a middleware system.
* No longer depends on RingPHP, but rather places the HTTP handlers directly
in Guzzle, operating on PSR-7 messages.
* Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which
means the `guzzlehttp/retry-subscriber` is now obsolete.
* Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`.
* No longer supports the `future` request option to send an async request.
Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`,
* Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid
recursion required by chaining and forwarding react promises. See
https://github.com/guzzle/promises
* Added `requestAsync` and `sendAsync` to send request asynchronously.
* Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests
* Added the `form_fields` and `form_files` request options.
* Removed the `GuzzleHttp\Post` namespace.
* The `body` request option no longer accepts an array for POST requests.
* The `exceptions` request option has been deprecated in favor of the
`http_errors` request options.
* The `save_to` request option has been deprecated in favor of `sink` request
* Clients no longer accept an array of URI template string and variables for
URI variables. You will need to expand URI templates before passing them
into a client constructor or request method.
* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are
now magic methods that will send synchronous requests.
* Replaced `Utils.php` with plain functions in `functions.php`.
* Removed `GuzzleHttp\Collection`.
* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as
* Removed `GuzzleHttp\Query`. Query string handling is now handled using an
associative array passed into the `query` request option. The query string
is serialized using PHP's `http_build_query`. If you need more control, you
can pass the query string in as a string.
* `GuzzleHttp\QueryParser` has been replaced with the
`GuzzleHttp\Psr7\parse_query`.
* Added `AppliesHeadersInterface` to make applying headers to a request based
on the body more generic and not specific to `PostBodyInterface`.
* Reduced the number of stack frames needed to send requests.
* Nested futures are now resolved in the client rather than the RequestFsm
* Finishing state transitions is now handled in the RequestFsm rather than the
* Added a guard in the Pool class to not use recursion for request retries.
* Pool class no longer uses recursion when a request is intercepted.
* The size of a Pool can now be dynamically adjusted using a callback.
See https://github.com/guzzle/guzzle/pull/943.
* Setting a request option to `null` when creating a request with a client will
ensure that the option is not set. This allows you to overwrite default
request options on a per-request basis.
See https://github.com/guzzle/guzzle/pull/937.
* Added the ability to limit which protocols are allowed for redirects by
specifying a `protocols` array in the `allow_redirects` request option.
* Nested futures due to retries are now resolved when waiting for synchronous
responses. See https://github.com/guzzle/guzzle/pull/947.
* `"0"` is now an allowed URI path. See
https://github.com/guzzle/guzzle/pull/935.
* `Query` no longer typehints on the `$query` argument in the constructor,
allowing for strings and arrays.
* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
specific exceptions if necessary.
This change updates query strings so that they are treated as un-encoded values
by default where the value represents an un-encoded value to send over the
wire. A Query object then encodes the value before sending over the wire. This
means that even value query string values (e.g., ":") are url encoded. This
makes the Query class match PHP's http_build_query function. However, if you
want to send requests over the wire using valid query string characters that do
not need to be encoded, then you can provide a string to Url::setQuery() and
pass true as the second argument to specify that the query string is a raw
string that should not be parsed or encoded (unless a call to getQuery() is
subsequently made, forcing the query-string to be converted into a Query
* Added a trailing `\r\n` to multipart/form-data payloads. See
https://github.com/guzzle/guzzle/pull/871
* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs.
* Status codes are now returned as integers. See
https://github.com/guzzle/guzzle/issues/881
* No longer overwriting an existing `application/x-www-form-urlencoded` header
when sending POST requests, allowing for customized headers. See
https://github.com/guzzle/guzzle/issues/877
* Improved path URL serialization.
* No longer double percent-encoding characters in the path or query string if
they are already encoded.
* Now properly encoding the supplied path to a URL object, instead of only
* Note: This has been changed in 5.0.3 to now encode query string values by
default unless the `rawString` argument is provided when setting the query
string on a URL: Now allowing many more characters to be present in the
query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
* Fixed an issue where connection errors still returned response object in
error and end events event though the response is unusable. This has been
corrected so that a response is not returned in the `getResponse` method of
these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
* Fixed an issue where transfer statistics were not being populated in the
RingBridge. https://github.com/guzzle/guzzle/issues/866
Adding support for non-blocking responses and some minor API cleanup.
* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`.
* Added a public API for creating a default HTTP adapter.
* Updated the redirect plugin to be non-blocking so that redirects are sent
concurrently. Other plugins like this can now be updated to be non-blocking.
* Added a "progress" event so that you can get upload and download progress
* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers
requests concurrently using a capped pool size as efficiently as possible.
* Added `hasListeners()` to EmitterInterface.
* Removed `GuzzleHttp\ClientInterface::sendAll` and marked
`GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the
The breaking changes in this release are relatively minor. The biggest thing to
look out for is that request and response objects no longer implement fluent
* Removed the fluent interfaces (i.e., `return $this`) from requests,
responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
`GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
`GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
This also makes the Guzzle message interfaces compatible with the current
* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
for the HTTP request functions from function.php, these functions are now
implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode`
moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
`GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
`GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
`GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
caused problems for many users: they aren't PSR-4 compliant, require an
explicit include, and needed an if-guard to ensure that the functions are not
* Removing all classes from `GuzzleHttp\Adapter`, these are now
implemented as callables that are stored in `GuzzleHttp\Ring\Client`.
* Removed the concept of "parallel adapters". Sending requests serially or
concurrently is now handled using a single adapter.
* Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The
Transaction object now exposes the request, response, and client as public
properties. The getters and setters have been removed.
* Removed the "headers" event. This event was only useful for changing the
body a response once the headers of the response were known. You can implement
a similar behavior in a number of ways. One example might be to use a
FnStream that has access to the transaction being sent. For example, when the
first byte is written, you could check if the response headers match your
expectations, and if so, change the actual stream body that is being
* Removed the `asArray` parameter from
`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
value as an array, then use the newly added `getHeaderAsArray()` method of
`MessageInterface`. This change makes the Guzzle interfaces compatible with
* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
custom request options using double-dispatch (this was an implementation
detail). Instead, you should now provide an associative array to the
constructor which is a mapping of the request option name mapping to a
function that applies the option value to a request.
* Removed the concept of "throwImmediately" from exceptions and error events.
This control mechanism was used to stop a transfer of concurrent requests
from completing. This can now be handled by throwing the exception or by
cancelling a pool of requests or each outstanding future request individually.
* Updated to "GuzzleHttp\Streams" 3.0.
* `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
`maxLen` parameter. This update makes the Guzzle streams project
compatible with the current PSR-7 proposal.
* `GuzzleHttp\Stream\Stream::__construct`,
`GuzzleHttp\Stream\Stream::factory`, and
`GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
argument. They now accept an associative array of options, including the
"size" key and "metadata" key which can be used to provide custom metadata.
* Fixed a memory leak in the CurlAdapter when reusing cURL handles.
* No longer using `request_fulluri` in stream adapter proxies.
* Relative redirects are now based on the last response, not the first response.
* Ensuring that the StreamAdapter does not always add a Content-Type header
* Adding automated github releases with a phar and zip
* Now merging in default options using a case-insensitive comparison.
Closes https://github.com/guzzle/guzzle/issues/767
* Added the ability to automatically decode `Content-Encoding` response bodies
using the `decode_content` request option. This is set to `true` by default
to decode the response body if it comes over the wire with a
`Content-Encoding`. Set this value to `false` to disable decoding the
response content, and pass a string to provide a request `Accept-Encoding`
header and turn on automatic response decoding. This feature now allows you
to pass an `Accept-Encoding` header in the headers of a request but still
disable automatic response decoding.
Closes https://github.com/guzzle/guzzle/issues/764
* Added the ability to throw an exception immediately when transferring
requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760
* Updating guzzlehttp/streams dependency to ~2.1
* No longer utilizing the now deprecated namespaced methods from the stream
* Fixed an issue in the CurlFactory that caused setting the `stream=false`
request option to throw an exception.
See: https://github.com/guzzle/guzzle/issues/769
* TransactionIterator now calls rewind on the inner iterator.
See: https://github.com/guzzle/guzzle/pull/765
* You can now set the `Content-Type` header to `multipart/form-data`
when creating POST requests to force multipart bodies.
See https://github.com/guzzle/guzzle/issues/768
* Fixed an error in the HistoryPlugin that caused the same request and response
to be logged multiple times when an HTTP protocol error occurs.
* Ensuring that cURL does not add a default Content-Type when no Content-Type