1# CHANGELOG 2 3## 5.3.4 - 2019-10-30 4 5* Fix: Prevent concurrent writes in `FileCookieJar` 6 7## 5.3.3 - 2018-07-31 8 9* Fix bug parsing 0 epoch expiry times 10* Fix PHP 7.3 compatibility 11 12## 5.3.2 - 2018-01-15 13 14* Improve tests 15* Fix react promise dependency 16* Fix PHP 7 compatibility 17 18## 5.3.1 - 2016-07-18 19 20* Address HTTP_PROXY security vulnerability, CVE-2016-5385: 21 https://httpoxy.org/ 22* Event name fix: https://github.com/guzzle/guzzle/commit/fcae91ff31de41e312fe113ec3acbcda31b2622e 23* Response header case sensitivity fix: https://github.com/guzzle/guzzle/commit/043eeadf20ee40ddc6712faee4d3957a91f2b041 24 25## 5.3.0 - 2015-05-19 26 27* Mock now supports `save_to` 28* Marked `AbstractRequestEvent::getTransaction()` as public. 29* Fixed a bug in which multiple headers using different casing would overwrite 30 previous headers in the associative array. 31* Added `Utils::getDefaultHandler()` 32* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. 33* URL scheme is now always lowercased. 34 35## 5.2.0 - 2015-01-27 36 37* Added `AppliesHeadersInterface` to make applying headers to a request based 38 on the body more generic and not specific to `PostBodyInterface`. 39* Reduced the number of stack frames needed to send requests. 40* Nested futures are now resolved in the client rather than the RequestFsm 41* Finishing state transitions is now handled in the RequestFsm rather than the 42 RingBridge. 43* Added a guard in the Pool class to not use recursion for request retries. 44 45## 5.1.0 - 2014-12-19 46 47* Pool class no longer uses recursion when a request is intercepted. 48* The size of a Pool can now be dynamically adjusted using a callback. 49 See https://github.com/guzzle/guzzle/pull/943. 50* Setting a request option to `null` when creating a request with a client will 51 ensure that the option is not set. This allows you to overwrite default 52 request options on a per-request basis. 53 See https://github.com/guzzle/guzzle/pull/937. 54* Added the ability to limit which protocols are allowed for redirects by 55 specifying a `protocols` array in the `allow_redirects` request option. 56* Nested futures due to retries are now resolved when waiting for synchronous 57 responses. See https://github.com/guzzle/guzzle/pull/947. 58* `"0"` is now an allowed URI path. See 59 https://github.com/guzzle/guzzle/pull/935. 60* `Query` no longer typehints on the `$query` argument in the constructor, 61 allowing for strings and arrays. 62* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle 63 specific exceptions if necessary. 64 65## 5.0.3 - 2014-11-03 66 67This change updates query strings so that they are treated as un-encoded values 68by default where the value represents an un-encoded value to send over the 69wire. A Query object then encodes the value before sending over the wire. This 70means that even value query string values (e.g., ":") are url encoded. This 71makes the Query class match PHP's http_build_query function. However, if you 72want to send requests over the wire using valid query string characters that do 73not need to be encoded, then you can provide a string to Url::setQuery() and 74pass true as the second argument to specify that the query string is a raw 75string that should not be parsed or encoded (unless a call to getQuery() is 76subsequently made, forcing the query-string to be converted into a Query 77object). 78 79## 5.0.2 - 2014-10-30 80 81* Added a trailing `\r\n` to multipart/form-data payloads. See 82 https://github.com/guzzle/guzzle/pull/871 83* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. 84* Status codes are now returned as integers. See 85 https://github.com/guzzle/guzzle/issues/881 86* No longer overwriting an existing `application/x-www-form-urlencoded` header 87 when sending POST requests, allowing for customized headers. See 88 https://github.com/guzzle/guzzle/issues/877 89* Improved path URL serialization. 90 91 * No longer double percent-encoding characters in the path or query string if 92 they are already encoded. 93 * Now properly encoding the supplied path to a URL object, instead of only 94 encoding ' ' and '?'. 95 * Note: This has been changed in 5.0.3 to now encode query string values by 96 default unless the `rawString` argument is provided when setting the query 97 string on a URL: Now allowing many more characters to be present in the 98 query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A 99 100## 5.0.1 - 2014-10-16 101 102Bugfix release. 103 104* Fixed an issue where connection errors still returned response object in 105 error and end events event though the response is unusable. This has been 106 corrected so that a response is not returned in the `getResponse` method of 107 these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 108* Fixed an issue where transfer statistics were not being populated in the 109 RingBridge. https://github.com/guzzle/guzzle/issues/866 110 111## 5.0.0 - 2014-10-12 112 113Adding support for non-blocking responses and some minor API cleanup. 114 115### New Features 116 117* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. 118* Added a public API for creating a default HTTP adapter. 119* Updated the redirect plugin to be non-blocking so that redirects are sent 120 concurrently. Other plugins like this can now be updated to be non-blocking. 121* Added a "progress" event so that you can get upload and download progress 122 events. 123* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers 124 requests concurrently using a capped pool size as efficiently as possible. 125* Added `hasListeners()` to EmitterInterface. 126* Removed `GuzzleHttp\ClientInterface::sendAll` and marked 127 `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the 128 recommended way). 129 130### Breaking changes 131 132The breaking changes in this release are relatively minor. The biggest thing to 133look out for is that request and response objects no longer implement fluent 134interfaces. 135 136* Removed the fluent interfaces (i.e., `return $this`) from requests, 137 responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, 138 `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and 139 `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of 140 why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. 141 This also makes the Guzzle message interfaces compatible with the current 142 PSR-7 message proposal. 143* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except 144 for the HTTP request functions from function.php, these functions are now 145 implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` 146 moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to 147 `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to 148 `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be 149 `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php 150 caused problems for many users: they aren't PSR-4 compliant, require an 151 explicit include, and needed an if-guard to ensure that the functions are not 152 declared multiple times. 153* Rewrote adapter layer. 154 * Removing all classes from `GuzzleHttp\Adapter`, these are now 155 implemented as callables that are stored in `GuzzleHttp\Ring\Client`. 156 * Removed the concept of "parallel adapters". Sending requests serially or 157 concurrently is now handled using a single adapter. 158 * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The 159 Transaction object now exposes the request, response, and client as public 160 properties. The getters and setters have been removed. 161* Removed the "headers" event. This event was only useful for changing the 162 body a response once the headers of the response were known. You can implement 163 a similar behavior in a number of ways. One example might be to use a 164 FnStream that has access to the transaction being sent. For example, when the 165 first byte is written, you could check if the response headers match your 166 expectations, and if so, change the actual stream body that is being 167 written to. 168* Removed the `asArray` parameter from 169 `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header 170 value as an array, then use the newly added `getHeaderAsArray()` method of 171 `MessageInterface`. This change makes the Guzzle interfaces compatible with 172 the PSR-7 interfaces. 173* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add 174 custom request options using double-dispatch (this was an implementation 175 detail). Instead, you should now provide an associative array to the 176 constructor which is a mapping of the request option name mapping to a 177 function that applies the option value to a request. 178* Removed the concept of "throwImmediately" from exceptions and error events. 179 This control mechanism was used to stop a transfer of concurrent requests 180 from completing. This can now be handled by throwing the exception or by 181 cancelling a pool of requests or each outstanding future request individually. 182* Updated to "GuzzleHttp\Streams" 3.0. 183 * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a 184 `maxLen` parameter. This update makes the Guzzle streams project 185 compatible with the current PSR-7 proposal. 186 * `GuzzleHttp\Stream\Stream::__construct`, 187 `GuzzleHttp\Stream\Stream::factory`, and 188 `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second 189 argument. They now accept an associative array of options, including the 190 "size" key and "metadata" key which can be used to provide custom metadata. 191 192## 4.2.2 - 2014-09-08 193 194* Fixed a memory leak in the CurlAdapter when reusing cURL handles. 195* No longer using `request_fulluri` in stream adapter proxies. 196* Relative redirects are now based on the last response, not the first response. 197 198## 4.2.1 - 2014-08-19 199 200* Ensuring that the StreamAdapter does not always add a Content-Type header 201* Adding automated github releases with a phar and zip 202 203## 4.2.0 - 2014-08-17 204 205* Now merging in default options using a case-insensitive comparison. 206 Closes https://github.com/guzzle/guzzle/issues/767 207* Added the ability to automatically decode `Content-Encoding` response bodies 208 using the `decode_content` request option. This is set to `true` by default 209 to decode the response body if it comes over the wire with a 210 `Content-Encoding`. Set this value to `false` to disable decoding the 211 response content, and pass a string to provide a request `Accept-Encoding` 212 header and turn on automatic response decoding. This feature now allows you 213 to pass an `Accept-Encoding` header in the headers of a request but still 214 disable automatic response decoding. 215 Closes https://github.com/guzzle/guzzle/issues/764 216* Added the ability to throw an exception immediately when transferring 217 requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 218* Updating guzzlehttp/streams dependency to ~2.1 219* No longer utilizing the now deprecated namespaced methods from the stream 220 package. 221 222## 4.1.8 - 2014-08-14 223 224* Fixed an issue in the CurlFactory that caused setting the `stream=false` 225 request option to throw an exception. 226 See: https://github.com/guzzle/guzzle/issues/769 227* TransactionIterator now calls rewind on the inner iterator. 228 See: https://github.com/guzzle/guzzle/pull/765 229* You can now set the `Content-Type` header to `multipart/form-data` 230 when creating POST requests to force multipart bodies. 231 See https://github.com/guzzle/guzzle/issues/768 232 233## 4.1.7 - 2014-08-07 234 235* Fixed an error in the HistoryPlugin that caused the same request and response 236 to be logged multiple times when an HTTP protocol error occurs. 237* Ensuring that cURL does not add a default Content-Type when no Content-Type 238 has been supplied by the user. This prevents the adapter layer from modifying 239 the request that is sent over the wire after any listeners may have already 240 put the request in a desired state (e.g., signed the request). 241* Throwing an exception when you attempt to send requests that have the 242 "stream" set to true in parallel using the MultiAdapter. 243* Only calling curl_multi_select when there are active cURL handles. This was 244 previously changed and caused performance problems on some systems due to PHP 245 always selecting until the maximum select timeout. 246* Fixed a bug where multipart/form-data POST fields were not correctly 247 aggregated (e.g., values with "&"). 248 249## 4.1.6 - 2014-08-03 250 251* Added helper methods to make it easier to represent messages as strings, 252 including getting the start line and getting headers as a string. 253 254## 4.1.5 - 2014-08-02 255 256* Automatically retrying cURL "Connection died, retrying a fresh connect" 257 errors when possible. 258* cURL implementation cleanup 259* Allowing multiple event subscriber listeners to be registered per event by 260 passing an array of arrays of listener configuration. 261 262## 4.1.4 - 2014-07-22 263 264* Fixed a bug that caused multi-part POST requests with more than one field to 265 serialize incorrectly. 266* Paths can now be set to "0" 267* `ResponseInterface::xml` now accepts a `libxml_options` option and added a 268 missing default argument that was required when parsing XML response bodies. 269* A `save_to` stream is now created lazily, which means that files are not 270 created on disk unless a request succeeds. 271 272## 4.1.3 - 2014-07-15 273 274* Various fixes to multipart/form-data POST uploads 275* Wrapping function.php in an if-statement to ensure Guzzle can be used 276 globally and in a Composer install 277* Fixed an issue with generating and merging in events to an event array 278* POST headers are only applied before sending a request to allow you to change 279 the query aggregator used before uploading 280* Added much more robust query string parsing 281* Fixed various parsing and normalization issues with URLs 282* Fixing an issue where multi-valued headers were not being utilized correctly 283 in the StreamAdapter 284 285## 4.1.2 - 2014-06-18 286 287* Added support for sending payloads with GET requests 288 289## 4.1.1 - 2014-06-08 290 291* Fixed an issue related to using custom message factory options in subclasses 292* Fixed an issue with nested form fields in a multi-part POST 293* Fixed an issue with using the `json` request option for POST requests 294* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` 295 296## 4.1.0 - 2014-05-27 297 298* Added a `json` request option to easily serialize JSON payloads. 299* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. 300* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. 301* Added the ability to provide an emitter to a client in the client constructor. 302* Added the ability to persist a cookie session using $_SESSION. 303* Added a trait that can be used to add event listeners to an iterator. 304* Removed request method constants from RequestInterface. 305* Fixed warning when invalid request start-lines are received. 306* Updated MessageFactory to work with custom request option methods. 307* Updated cacert bundle to latest build. 308 3094.0.2 (2014-04-16) 310------------------ 311 312* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) 313* Added the ability to set scalars as POST fields (#628) 314 315## 4.0.1 - 2014-04-04 316 317* The HTTP status code of a response is now set as the exception code of 318 RequestException objects. 319* 303 redirects will now correctly switch from POST to GET requests. 320* The default parallel adapter of a client now correctly uses the MultiAdapter. 321* HasDataTrait now initializes the internal data array as an empty array so 322 that the toArray() method always returns an array. 323 324## 4.0.0 - 2014-03-29 325 326* For more information on the 4.0 transition, see: 327 http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ 328* For information on changes and upgrading, see: 329 https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 330* Added `GuzzleHttp\batch()` as a convenience function for sending requests in 331 parallel without needing to write asynchronous code. 332* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. 333 You can now pass a callable or an array of associative arrays where each 334 associative array contains the "fn", "priority", and "once" keys. 335 336## 4.0.0.rc-2 - 2014-03-25 337 338* Removed `getConfig()` and `setConfig()` from clients to avoid confusion 339 around whether things like base_url, message_factory, etc. should be able to 340 be retrieved or modified. 341* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface 342* functions.php functions were renamed using snake_case to match PHP idioms 343* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and 344 `GUZZLE_CURL_SELECT_TIMEOUT` environment variables 345* Added the ability to specify custom `sendAll()` event priorities 346* Added the ability to specify custom stream context options to the stream 347 adapter. 348* Added a functions.php function for `get_path()` and `set_path()` 349* CurlAdapter and MultiAdapter now use a callable to generate curl resources 350* MockAdapter now properly reads a body and emits a `headers` event 351* Updated Url class to check if a scheme and host are set before adding ":" 352 and "//". This allows empty Url (e.g., "") to be serialized as "". 353* Parsing invalid XML no longer emits warnings 354* Curl classes now properly throw AdapterExceptions 355* Various performance optimizations 356* Streams are created with the faster `Stream\create()` function 357* Marked deprecation_proxy() as internal 358* Test server is now a collection of static methods on a class 359 360## 4.0.0-rc.1 - 2014-03-15 361 362* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 363 364## 3.8.1 - 2014-01-28 365 366* Bug: Always using GET requests when redirecting from a 303 response 367* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in 368 `Guzzle\Http\ClientInterface::setSslVerification()` 369* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL 370* Bug: The body of a request can now be set to `"0"` 371* Sending PHP stream requests no longer forces `HTTP/1.0` 372* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of 373 each sub-exception 374* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than 375 clobbering everything). 376* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) 377* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. 378 For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. 379* Now properly escaping the regular expression delimiter when matching Cookie domains. 380* Network access is now disabled when loading XML documents 381 382## 3.8.0 - 2013-12-05 383 384* Added the ability to define a POST name for a file 385* JSON response parsing now properly walks additionalProperties 386* cURL error code 18 is now retried automatically in the BackoffPlugin 387* Fixed a cURL error when URLs contain fragments 388* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were 389 CurlExceptions 390* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) 391* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` 392* Fixed a bug that was encountered when parsing empty header parameters 393* UriTemplate now has a `setRegex()` method to match the docs 394* The `debug` request parameter now checks if it is truthy rather than if it exists 395* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin 396* Added the ability to combine URLs using strict RFC 3986 compliance 397* Command objects can now return the validation errors encountered by the command 398* Various fixes to cache revalidation (#437 and 29797e5) 399* Various fixes to the AsyncPlugin 400* Cleaned up build scripts 401 402## 3.7.4 - 2013-10-02 403 404* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) 405* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp 406 (see https://github.com/aws/aws-sdk-php/issues/147) 407* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots 408* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) 409* Updated the bundled cacert.pem (#419) 410* OauthPlugin now supports adding authentication to headers or query string (#425) 411 412## 3.7.3 - 2013-09-08 413 414* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and 415 `CommandTransferException`. 416* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description 417* Schemas are only injected into response models when explicitly configured. 418* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of 419 an EntityBody. 420* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. 421* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. 422* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() 423* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin 424* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests 425* Bug fix: Properly parsing headers that contain commas contained in quotes 426* Bug fix: mimetype guessing based on a filename is now case-insensitive 427 428## 3.7.2 - 2013-08-02 429 430* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander 431 See https://github.com/guzzle/guzzle/issues/371 432* Bug fix: Cookie domains are now matched correctly according to RFC 6265 433 See https://github.com/guzzle/guzzle/issues/377 434* Bug fix: GET parameters are now used when calculating an OAuth signature 435* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted 436* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched 437* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. 438 See https://github.com/guzzle/guzzle/issues/379 439* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See 440 https://github.com/guzzle/guzzle/pull/380 441* cURL multi cleanup and optimizations 442 443## 3.7.1 - 2013-07-05 444 445* Bug fix: Setting default options on a client now works 446* Bug fix: Setting options on HEAD requests now works. See #352 447* Bug fix: Moving stream factory before send event to before building the stream. See #353 448* Bug fix: Cookies no longer match on IP addresses per RFC 6265 449* Bug fix: Correctly parsing header parameters that are in `<>` and quotes 450* Added `cert` and `ssl_key` as request options 451* `Host` header can now diverge from the host part of a URL if the header is set manually 452* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter 453* OAuth parameters are only added via the plugin if they aren't already set 454* Exceptions are now thrown when a URL cannot be parsed 455* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails 456* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin 457 458## 3.7.0 - 2013-06-10 459 460* See UPGRADING.md for more information on how to upgrade. 461* Requests now support the ability to specify an array of $options when creating a request to more easily modify a 462 request. You can pass a 'request.options' configuration setting to a client to apply default request options to 463 every request created by a client (e.g. default query string variables, headers, curl options, etc.). 464* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. 465 See `Guzzle\Http\StaticClient::mount`. 466* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests 467 created by a command (e.g. custom headers, query string variables, timeout settings, etc.). 468* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the 469 headers of a response 470* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key 471 (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) 472* ServiceBuilders now support storing and retrieving arbitrary data 473* CachePlugin can now purge all resources for a given URI 474* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource 475* CachePlugin now uses the Vary header to determine if a resource is a cache hit 476* `Guzzle\Http\Message\Response` now implements `\Serializable` 477* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters 478* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable 479* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` 480* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size 481* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message 482* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older 483 Symfony users can still use the old version of Monolog. 484* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. 485 Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. 486* Several performance improvements to `Guzzle\Common\Collection` 487* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: 488 createRequest, head, delete, put, patch, post, options, prepareRequest 489* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` 490* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` 491* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to 492 `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a 493 resource, string, or EntityBody into the $options parameter to specify the download location of the response. 494* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a 495 default `array()` 496* Added `Guzzle\Stream\StreamInterface::isRepeatable` 497* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use 498 $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or 499 $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. 500* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. 501* Removed `Guzzle\Http\ClientInterface::expandTemplate()` 502* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` 503* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` 504* Removed `Guzzle\Http\Message\RequestInterface::canCache` 505* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` 506* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` 507* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. 508* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting 509 `Guzzle\Common\Version::$emitWarnings` to true. 510* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use 511 `$request->getResponseBody()->isRepeatable()` instead. 512* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use 513 `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. 514* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use 515 `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. 516* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. 517* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. 518* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated 519* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. 520 These will work through Guzzle 4.0 521* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. 522* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. 523* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. 524* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. 525* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. 526* Marked `Guzzle\Common\Collection::inject()` as deprecated. 527* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` 528* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a 529 CacheStorageInterface. These two objects and interface will be removed in a future version. 530* Always setting X-cache headers on cached responses 531* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin 532* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface 533 $request, Response $response);` 534* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` 535* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` 536* Added `CacheStorageInterface::purge($url)` 537* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin 538 $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, 539 CanCacheStrategyInterface $canCache = null)` 540* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` 541 542## 3.6.0 - 2013-05-29 543 544* ServiceDescription now implements ToArrayInterface 545* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters 546* Guzzle can now correctly parse incomplete URLs 547* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. 548* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution 549* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). 550* Specific header implementations can be created for complex headers. When a message creates a header, it uses a 551 HeaderFactory which can map specific headers to specific header classes. There is now a Link header and 552 CacheControl header implementation. 553* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate 554* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() 555* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in 556 Guzzle\Http\Curl\RequestMediator 557* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. 558* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface 559* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() 560* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() 561* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). 562* All response header helper functions return a string rather than mixing Header objects and strings inconsistently 563* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle 564 directly via interfaces 565* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist 566 but are a no-op until removed. 567* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a 568 `Guzzle\Service\Command\ArrayCommandInterface`. 569* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response 570 on a request while the request is still being transferred 571* The ability to case-insensitively search for header values 572* Guzzle\Http\Message\Header::hasExactHeader 573* Guzzle\Http\Message\Header::raw. Use getAll() 574* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object 575 instead. 576* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess 577* Added the ability to cast Model objects to a string to view debug information. 578 579## 3.5.0 - 2013-05-13 580 581* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times 582* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove 583 itself from the EventDispatcher) 584* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values 585* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too 586* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a 587 non-existent key 588* Bug: All __call() method arguments are now required (helps with mocking frameworks) 589* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference 590 to help with refcount based garbage collection of resources created by sending a request 591* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. 592* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it'sdeprecated). Use the 593 HistoryPlugin for a history. 594* Added a `responseBody` alias for the `response_body` location 595* Refactored internals to no longer rely on Response::getRequest() 596* HistoryPlugin can now be cast to a string 597* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests 598 and responses that are sent over the wire 599* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects 600 601## 3.4.3 - 2013-04-30 602 603* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response 604* Added a check to re-extract the temp cacert bundle from the phar before sending each request 605 606## 3.4.2 - 2013-04-29 607 608* Bug fix: Stream objects now work correctly with "a" and "a+" modes 609* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present 610* Bug fix: AsyncPlugin no longer forces HEAD requests 611* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter 612* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails 613* Setting a response on a request will write to the custom request body from the response body if one is specified 614* LogPlugin now writes to php://output when STDERR is undefined 615* Added the ability to set multiple POST files for the same key in a single call 616* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default 617* Added the ability to queue CurlExceptions to the MockPlugin 618* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) 619* Configuration loading now allows remote files 620 621## 3.4.1 - 2013-04-16 622 623* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti 624 handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. 625* Exceptions are now properly grouped when sending requests in parallel 626* Redirects are now properly aggregated when a multi transaction fails 627* Redirects now set the response on the original object even in the event of a failure 628* Bug fix: Model names are now properly set even when using $refs 629* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax 630* Added support for oauth_callback in OAuth signatures 631* Added support for oauth_verifier in OAuth signatures 632* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection 633 634## 3.4.0 - 2013-04-11 635 636* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 637* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 638* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 639* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. 640* Bug fix: Added `number` type to service descriptions. 641* Bug fix: empty parameters are removed from an OAuth signature 642* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header 643* Bug fix: Fixed "array to string" error when validating a union of types in a service description 644* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream 645* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. 646* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. 647* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. 648* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if 649 the Content-Type can be determined based on the entity body or the path of the request. 650* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. 651* Added support for a PSR-3 LogAdapter. 652* Added a `command.after_prepare` event 653* Added `oauth_callback` parameter to the OauthPlugin 654* Added the ability to create a custom stream class when using a stream factory 655* Added a CachingEntityBody decorator 656* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. 657* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. 658* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies 659* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This 660 means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use 661 POST fields or files (the latter is only used when emulating a form POST in the browser). 662* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest 663 664## 3.3.1 - 2013-03-10 665 666* Added the ability to create PHP streaming responses from HTTP requests 667* Bug fix: Running any filters when parsing response headers with service descriptions 668* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing 669* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across 670 response location visitors. 671* Bug fix: Removed the possibility of creating configuration files with circular dependencies 672* RequestFactory::create() now uses the key of a POST file when setting the POST file name 673* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set 674 675## 3.3.0 - 2013-03-03 676 677* A large number of performance optimizations have been made 678* Bug fix: Added 'wb' as a valid write mode for streams 679* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned 680* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` 681* BC: Removed `Guzzle\Http\Utils` class 682* BC: Setting a service description on a client will no longer modify the client's command factories. 683* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using 684 the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' 685* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to 686 lowercase 687* Operation parameter objects are now lazy loaded internally 688* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses 689* Added support for instantiating responseType=class responseClass classes. Classes must implement 690 `Guzzle\Service\Command\ResponseClassInterface` 691* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These 692 additional properties also support locations and can be used to parse JSON responses where the outermost part of the 693 JSON is an array 694* Added support for nested renaming of JSON models (rename sentAs to name) 695* CachePlugin 696 * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error 697 * Debug headers can now added to cached response in the CachePlugin 698 699## 3.2.0 - 2013-02-14 700 701* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. 702* URLs with no path no longer contain a "/" by default 703* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. 704* BadResponseException no longer includes the full request and response message 705* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface 706* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface 707* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription 708* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list 709* xmlEncoding can now be customized for the XML declaration of a XML service description operation 710* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value 711 aggregation and no longer uses callbacks 712* The URL encoding implementation of Guzzle\Http\QueryString can now be customized 713* Bug fix: Filters were not always invoked for array service description parameters 714* Bug fix: Redirects now use a target response body rather than a temporary response body 715* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded 716* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives 717 718## 3.1.2 - 2013-01-27 719 720* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the 721 response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. 722* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent 723* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) 724* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() 725* Setting default headers on a client after setting the user-agent will not erase the user-agent setting 726 727## 3.1.1 - 2013-01-20 728 729* Adding wildcard support to Guzzle\Common\Collection::getPath() 730* Adding alias support to ServiceBuilder configs 731* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface 732 733## 3.1.0 - 2013-01-12 734 735* BC: CurlException now extends from RequestException rather than BadResponseException 736* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() 737* Added getData to ServiceDescriptionInterface 738* Added context array to RequestInterface::setState() 739* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http 740* Bug: Adding required content-type when JSON request visitor adds JSON to a command 741* Bug: Fixing the serialization of a service description with custom data 742* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing 743 an array of successful and failed responses 744* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection 745* Added Guzzle\Http\IoEmittingEntityBody 746* Moved command filtration from validators to location visitors 747* Added `extends` attributes to service description parameters 748* Added getModels to ServiceDescriptionInterface 749 750## 3.0.7 - 2012-12-19 751 752* Fixing phar detection when forcing a cacert to system if null or true 753* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` 754* Cleaning up `Guzzle\Common\Collection::inject` method 755* Adding a response_body location to service descriptions 756 757## 3.0.6 - 2012-12-09 758 759* CurlMulti performance improvements 760* Adding setErrorResponses() to Operation 761* composer.json tweaks 762 763## 3.0.5 - 2012-11-18 764 765* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin 766* Bug: Response body can now be a string containing "0" 767* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert 768* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs 769* Added support for XML attributes in service description responses 770* DefaultRequestSerializer now supports array URI parameter values for URI template expansion 771* Added better mimetype guessing to requests and post files 772 773## 3.0.4 - 2012-11-11 774 775* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value 776* Bug: Cookies can now be added that have a name, domain, or value set to "0" 777* Bug: Using the system cacert bundle when using the Phar 778* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures 779* Enhanced cookie jar de-duplication 780* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added 781* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies 782* Added the ability to create any sort of hash for a stream rather than just an MD5 hash 783 784## 3.0.3 - 2012-11-04 785 786* Implementing redirects in PHP rather than cURL 787* Added PECL URI template extension and using as default parser if available 788* Bug: Fixed Content-Length parsing of Response factory 789* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. 790* Adding ToArrayInterface throughout library 791* Fixing OauthPlugin to create unique nonce values per request 792 793## 3.0.2 - 2012-10-25 794 795* Magic methods are enabled by default on clients 796* Magic methods return the result of a command 797* Service clients no longer require a base_url option in the factory 798* Bug: Fixed an issue with URI templates where null template variables were being expanded 799 800## 3.0.1 - 2012-10-22 801 802* Models can now be used like regular collection objects by calling filter, map, etc. 803* Models no longer require a Parameter structure or initial data in the constructor 804* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` 805 806## 3.0.0 - 2012-10-15 807 808* Rewrote service description format to be based on Swagger 809 * Now based on JSON schema 810 * Added nested input structures and nested response models 811 * Support for JSON and XML input and output models 812 * Renamed `commands` to `operations` 813 * Removed dot class notation 814 * Removed custom types 815* Broke the project into smaller top-level namespaces to be more component friendly 816* Removed support for XML configs and descriptions. Use arrays or JSON files. 817* Removed the Validation component and Inspector 818* Moved all cookie code to Guzzle\Plugin\Cookie 819* Magic methods on a Guzzle\Service\Client now return the command un-executed. 820* Calling getResult() or getResponse() on a command will lazily execute the command if needed. 821* Now shipping with cURL's CA certs and using it by default 822* Added previousResponse() method to response objects 823* No longer sending Accept and Accept-Encoding headers on every request 824* Only sending an Expect header by default when a payload is greater than 1MB 825* Added/moved client options: 826 * curl.blacklist to curl.option.blacklist 827 * Added ssl.certificate_authority 828* Added a Guzzle\Iterator component 829* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin 830* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) 831* Added a more robust caching plugin 832* Added setBody to response objects 833* Updating LogPlugin to use a more flexible MessageFormatter 834* Added a completely revamped build process 835* Cleaning up Collection class and removing default values from the get method 836* Fixed ZF2 cache adapters 837 838## 2.8.8 - 2012-10-15 839 840* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did 841 842## 2.8.7 - 2012-09-30 843 844* Bug: Fixed config file aliases for JSON includes 845* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests 846* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload 847* Bug: Hardening request and response parsing to account for missing parts 848* Bug: Fixed PEAR packaging 849* Bug: Fixed Request::getInfo 850* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail 851* Adding the ability for the namespace Iterator factory to look in multiple directories 852* Added more getters/setters/removers from service descriptions 853* Added the ability to remove POST fields from OAuth signatures 854* OAuth plugin now supports 2-legged OAuth 855 856## 2.8.6 - 2012-09-05 857 858* Added the ability to modify and build service descriptions 859* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command 860* Added a `json` parameter location 861* Now allowing dot notation for classes in the CacheAdapterFactory 862* Using the union of two arrays rather than an array_merge when extending service builder services and service params 863* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references 864 in service builder config files. 865* Services defined in two different config files that include one another will by default replace the previously 866 defined service, but you can now create services that extend themselves and merge their settings over the previous 867* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like 868 '_default' with a default JSON configuration file. 869 870## 2.8.5 - 2012-08-29 871 872* Bug: Suppressed empty arrays from URI templates 873* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching 874* Added support for HTTP responses that do not contain a reason phrase in the start-line 875* AbstractCommand commands are now invokable 876* Added a way to get the data used when signing an Oauth request before a request is sent 877 878## 2.8.4 - 2012-08-15 879 880* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin 881* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. 882* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream 883* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream 884* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) 885* Added additional response status codes 886* Removed SSL information from the default User-Agent header 887* DELETE requests can now send an entity body 888* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries 889* Added the ability of the MockPlugin to consume mocked request bodies 890* LogPlugin now exposes request and response objects in the extras array 891 892## 2.8.3 - 2012-07-30 893 894* Bug: Fixed a case where empty POST requests were sent as GET requests 895* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body 896* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new 897* Added multiple inheritance to service description commands 898* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` 899* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything 900* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles 901 902## 2.8.2 - 2012-07-24 903 904* Bug: Query string values set to 0 are no longer dropped from the query string 905* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` 906* Bug: `+` is now treated as an encoded space when parsing query strings 907* QueryString and Collection performance improvements 908* Allowing dot notation for class paths in filters attribute of a service descriptions 909 910## 2.8.1 - 2012-07-16 911 912* Loosening Event Dispatcher dependency 913* POST redirects can now be customized using CURLOPT_POSTREDIR 914 915## 2.8.0 - 2012-07-15 916 917* BC: Guzzle\Http\Query 918 * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) 919 * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() 920 * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) 921 * Changed the aggregation functions of QueryString to be static methods 922 * Can now use fromString() with querystrings that have a leading ? 923* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters 924* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body 925* Cookies are no longer URL decoded by default 926* Bug: URI template variables set to null are no longer expanded 927 928## 2.7.2 - 2012-07-02 929 930* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. 931* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() 932* CachePlugin now allows for a custom request parameter function to check if a request can be cached 933* Bug fix: CachePlugin now only caches GET and HEAD requests by default 934* Bug fix: Using header glue when transferring headers over the wire 935* Allowing deeply nested arrays for composite variables in URI templates 936* Batch divisors can now return iterators or arrays 937 938## 2.7.1 - 2012-06-26 939 940* Minor patch to update version number in UA string 941* Updating build process 942 943## 2.7.0 - 2012-06-25 944 945* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. 946* BC: Removed magic setX methods from commands 947* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method 948* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. 949* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) 950* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace 951* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin 952* Added the ability to set POST fields and files in a service description 953* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method 954* Adding a command.before_prepare event to clients 955* Added BatchClosureTransfer and BatchClosureDivisor 956* BatchTransferException now includes references to the batch divisor and transfer strategies 957* Fixed some tests so that they pass more reliably 958* Added Guzzle\Common\Log\ArrayLogAdapter 959 960## 2.6.6 - 2012-06-10 961 962* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin 963* BC: Removing Guzzle\Service\Command\CommandSet 964* Adding generic batching system (replaces the batch queue plugin and command set) 965* Updating ZF cache and log adapters and now using ZF's composer repository 966* Bug: Setting the name of each ApiParam when creating through an ApiCommand 967* Adding result_type, result_doc, deprecated, and doc_url to service descriptions 968* Bug: Changed the default cookie header casing back to 'Cookie' 969 970## 2.6.5 - 2012-06-03 971 972* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() 973* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from 974* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data 975* BC: Renaming methods in the CookieJarInterface 976* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations 977* Making the default glue for HTTP headers ';' instead of ',' 978* Adding a removeValue to Guzzle\Http\Message\Header 979* Adding getCookies() to request interface. 980* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() 981 982## 2.6.4 - 2012-05-30 983 984* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. 985* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand 986* Bug: Fixing magic method command calls on clients 987* Bug: Email constraint only validates strings 988* Bug: Aggregate POST fields when POST files are present in curl handle 989* Bug: Fixing default User-Agent header 990* Bug: Only appending or prepending parameters in commands if they are specified 991* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes 992* Allowing the use of dot notation for class namespaces when using instance_of constraint 993* Added any_match validation constraint 994* Added an AsyncPlugin 995* Passing request object to the calculateWait method of the ExponentialBackoffPlugin 996* Allowing the result of a command object to be changed 997* Parsing location and type sub values when instantiating a service description rather than over and over at runtime 998 999## 2.6.3 - 2012-05-23 1000 1001* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. 1002* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. 1003* You can now use an array of data when creating PUT request bodies in the request factory. 1004* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. 1005* [Http] Adding support for Content-Type in multipart POST uploads per upload 1006* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) 1007* Adding more POST data operations for easier manipulation of POST data. 1008* You can now set empty POST fields. 1009* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. 1010* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. 1011* CS updates 1012 1013## 2.6.2 - 2012-05-19 1014 1015* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. 1016 1017## 2.6.1 - 2012-05-19 1018 1019* [BC] Removing 'path' support in service descriptions. Use 'uri'. 1020* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. 1021* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. 1022* [BC] Removing Guzzle\Common\XmlElement. 1023* All commands, both dynamic and concrete, have ApiCommand objects. 1024* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. 1025* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. 1026* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. 1027 1028## 2.6.0 - 2012-05-15 1029 1030* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder 1031* [BC] Executing a Command returns the result of the command rather than the command 1032* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. 1033* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. 1034* [BC] Moving ResourceIterator* to Guzzle\Service\Resource 1035* [BC] Completely refactored ResourceIterators to iterate over a cloned command object 1036* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate 1037* [BC] Guzzle\Guzzle is now deprecated 1038* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject 1039* Adding Guzzle\Version class to give version information about Guzzle 1040* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() 1041* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data 1042* ServiceDescription and ServiceBuilder are now cacheable using similar configs 1043* Changing the format of XML and JSON service builder configs. Backwards compatible. 1044* Cleaned up Cookie parsing 1045* Trimming the default Guzzle User-Agent header 1046* Adding a setOnComplete() method to Commands that is called when a command completes 1047* Keeping track of requests that were mocked in the MockPlugin 1048* Fixed a caching bug in the CacheAdapterFactory 1049* Inspector objects can be injected into a Command object 1050* Refactoring a lot of code and tests to be case insensitive when dealing with headers 1051* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL 1052* Adding the ability to set global option overrides to service builder configs 1053* Adding the ability to include other service builder config files from within XML and JSON files 1054* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. 1055 1056## 2.5.0 - 2012-05-08 1057 1058* Major performance improvements 1059* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. 1060* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. 1061* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" 1062* Added the ability to passed parameters to all requests created by a client 1063* Added callback functionality to the ExponentialBackoffPlugin 1064* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. 1065* Rewinding request stream bodies when retrying requests 1066* Exception is thrown when JSON response body cannot be decoded 1067* Added configurable magic method calls to clients and commands. This is off by default. 1068* Fixed a defect that added a hash to every parsed URL part 1069* Fixed duplicate none generation for OauthPlugin. 1070* Emitting an event each time a client is generated by a ServiceBuilder 1071* Using an ApiParams object instead of a Collection for parameters of an ApiCommand 1072* cache.* request parameters should be renamed to params.cache.* 1073* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. 1074* Added the ability to disable type validation of service descriptions 1075* ServiceDescriptions and ServiceBuilders are now Serializable 1076