summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2014-11-05 08:27:20 (GMT)
committerwebchick2014-11-05 08:27:20 (GMT)
commit45f2030a9a931fb5024dd614291b08cb60e32424 (patch)
treee8c39b6e20171366b1936d822b64eee0292e8312
parent090d5570eb277e20ca5c2b0a6a7b4df39d853313 (diff)
Revert "Issue #2369107 by lussoluca: Update Guzzle to 5.0.3."
Temporary revert; CMF 1.3 is also ready and is a bigger PITA to re-roll. This reverts commit d806a9bb87f7826a35f404a14e7eacffc45e79d9.
-rw-r--r--composer.lock12
-rw-r--r--core/vendor/composer/installed.json120
-rw-r--r--core/vendor/guzzlehttp/guzzle/CHANGELOG.md243
-rw-r--r--core/vendor/guzzlehttp/guzzle/Makefile4
-rw-r--r--core/vendor/guzzlehttp/guzzle/README.md10
-rw-r--r--core/vendor/guzzlehttp/guzzle/composer.json2
-rw-r--r--core/vendor/guzzlehttp/guzzle/docs/events.rst4
-rw-r--r--core/vendor/guzzlehttp/guzzle/docs/faq.rst4
-rw-r--r--core/vendor/guzzlehttp/guzzle/docs/handlers.rst2
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/ClientInterface.php2
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php15
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php2
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Message/Response.php6
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php4
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Pool.php16
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php4
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php7
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Query.php40
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/RingBridge.php4
-rw-r--r--core/vendor/guzzlehttp/guzzle/src/Url.php117
-rw-r--r--core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php1
-rw-r--r--core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php2
-rw-r--r--core/vendor/guzzlehttp/guzzle/tests/PoolTest.php12
-rw-r--r--core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php14
-rw-r--r--core/vendor/guzzlehttp/guzzle/tests/QueryTest.php13
-rw-r--r--core/vendor/guzzlehttp/guzzle/tests/UrlTest.php25
26 files changed, 289 insertions, 396 deletions
diff --git a/composer.lock b/composer.lock
index 4c65662..f933c55 100644
--- a/composer.lock
+++ b/composer.lock
@@ -568,16 +568,16 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "5.0.3",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282"
+ "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/6c72627de1d66832e4270e36e56acdb0d1d8f282",
- "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/28b51e11237f25cdb0efaea8e45af26007831aa9",
+ "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9",
"shasum": ""
},
"require": {
@@ -592,7 +592,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-ring": "5.0-dev"
}
},
"autoload": {
@@ -622,7 +622,7 @@
"rest",
"web service"
],
- "time": "2014-11-04 07:09:15"
+ "time": "2014-10-13 03:05:51"
},
{
"name": "guzzlehttp/ringphp",
diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json
index 21d4cd5..db7fa29 100644
--- a/core/vendor/composer/installed.json
+++ b/core/vendor/composer/installed.json
@@ -2529,6 +2529,66 @@
]
},
{
+ "name": "guzzlehttp/guzzle",
+ "version": "5.0.0",
+ "version_normalized": "5.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/28b51e11237f25cdb0efaea8e45af26007831aa9",
+ "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/ringphp": "~1.0",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "~4.0",
+ "psr/log": "~1.0"
+ },
+ "time": "2014-10-13 03:05:51",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-ring": "5.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "rest",
+ "web service"
+ ]
+ },
+ {
"name": "twig/twig",
"version": "v1.16.2",
"version_normalized": "1.16.2.0",
@@ -2586,65 +2646,5 @@
"keywords": [
"templating"
]
- },
- {
- "name": "guzzlehttp/guzzle",
- "version": "5.0.3",
- "version_normalized": "5.0.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/guzzle.git",
- "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/6c72627de1d66832e4270e36e56acdb0d1d8f282",
- "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282",
- "shasum": ""
- },
- "require": {
- "guzzlehttp/ringphp": "~1.0",
- "php": ">=5.4.0"
- },
- "require-dev": {
- "ext-curl": "*",
- "phpunit/phpunit": "~4.0",
- "psr/log": "~1.0"
- },
- "time": "2014-11-04 07:09:15",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.0-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- }
- ],
- "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
- "homepage": "http://guzzlephp.org/",
- "keywords": [
- "client",
- "curl",
- "framework",
- "http",
- "http client",
- "rest",
- "web service"
- ]
}
]
diff --git a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md b/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
index e997e10..63394fb 100644
--- a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
+++ b/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
@@ -1,52 +1,8 @@
-# CHANGELOG
-
-## 5.0.3 - 2014-11-03
-
-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
-object).
-
-## 5.0.2 - 2014-10-30
-
-* 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
- encoding ' ' and '?'.
- * 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
-
-## 5.0.1 - 2014-10-16
-
-Bugfix release.
-
-* 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
-
-## 5.0.0 - 2014-10-12
+CHANGELOG
+=========
+
+5.0.0 (2014-10-12)
+------------------
Adding support for non-blocking responses and some minor API cleanup.
@@ -127,18 +83,21 @@ interfaces.
argument. They now accept an associative array of options, including the
"size" key and "metadata" key which can be used to provide custom metadata.
-## 4.2.2 - 2014-09-08
+4.2.2 (2014-09-08)
+------------------
* 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.
-## 4.2.1 - 2014-08-19
+4.2.1 (2014-08-19)
+------------------
* Ensuring that the StreamAdapter does not always add a Content-Type header
* Adding automated github releases with a phar and zip
-## 4.2.0 - 2014-08-17
+4.2.0 (2014-08-17)
+------------------
* Now merging in default options using a case-insensitive comparison.
Closes https://github.com/guzzle/guzzle/issues/767
@@ -157,7 +116,8 @@ interfaces.
* No longer utilizing the now deprecated namespaced methods from the stream
package.
-## 4.1.8 - 2014-08-14
+4.1.8 (2014-08-14)
+------------------
* Fixed an issue in the CurlFactory that caused setting the `stream=false`
request option to throw an exception.
@@ -168,7 +128,8 @@ interfaces.
when creating POST requests to force multipart bodies.
See https://github.com/guzzle/guzzle/issues/768
-## 4.1.7 - 2014-08-07
+4.1.7 (2014-08-07)
+------------------
* Fixed an error in the HistoryPlugin that caused the same request and response
to be logged multiple times when an HTTP protocol error occurs.
@@ -184,12 +145,14 @@ interfaces.
* Fixed a bug where multipart/form-data POST fields were not correctly
aggregated (e.g., values with "&").
-## 4.1.6 - 2014-08-03
+4.1.6 (2014-08-03)
+------------------
* Added helper methods to make it easier to represent messages as strings,
including getting the start line and getting headers as a string.
-## 4.1.5 - 2014-08-02
+4.1.5 (2014-08-02)
+------------------
* Automatically retrying cURL "Connection died, retrying a fresh connect"
errors when possible.
@@ -197,7 +160,8 @@ interfaces.
* Allowing multiple event subscriber listeners to be registered per event by
passing an array of arrays of listener configuration.
-## 4.1.4 - 2014-07-22
+4.1.4 (2014-07-22)
+------------------
* Fixed a bug that caused multi-part POST requests with more than one field to
serialize incorrectly.
@@ -207,7 +171,8 @@ interfaces.
* A `save_to` stream is now created lazily, which means that files are not
created on disk unless a request succeeds.
-## 4.1.3 - 2014-07-15
+4.1.3 (2014-07-15)
+------------------
* Various fixes to multipart/form-data POST uploads
* Wrapping function.php in an if-statement to ensure Guzzle can be used
@@ -220,18 +185,21 @@ interfaces.
* Fixing an issue where multi-valued headers were not being utilized correctly
in the StreamAdapter
-## 4.1.2 - 2014-06-18
+4.1.2 (2014-06-18)
+------------------
* Added support for sending payloads with GET requests
-## 4.1.1 - 2014-06-08
+4.1.1 (2014-06-08)
+------------------
* Fixed an issue related to using custom message factory options in subclasses
* Fixed an issue with nested form fields in a multi-part POST
* Fixed an issue with using the `json` request option for POST requests
* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar`
-## 4.1.0 - 2014-05-27
+4.1.0 (2014-05-27)
+------------------
* Added a `json` request option to easily serialize JSON payloads.
* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON.
@@ -250,7 +218,8 @@ interfaces.
* Proxy requests using the StreamAdapter now properly use request_fulluri (#632)
* Added the ability to set scalars as POST fields (#628)
-## 4.0.1 - 2014-04-04
+4.0.1 (2014-04-04)
+------------------
* The HTTP status code of a response is now set as the exception code of
RequestException objects.
@@ -259,7 +228,8 @@ interfaces.
* HasDataTrait now initializes the internal data array as an empty array so
that the toArray() method always returns an array.
-## 4.0.0 - 2014-03-29
+4.0.0 (2014-03-29)
+------------------
* For more information on the 4.0 transition, see:
http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
@@ -271,7 +241,8 @@ interfaces.
You can now pass a callable or an array of associative arrays where each
associative array contains the "fn", "priority", and "once" keys.
-## 4.0.0.rc-2 - 2014-03-25
+4.0.0.rc-2 (2014-03-25)
+-----------------------
* Removed `getConfig()` and `setConfig()` from clients to avoid confusion
around whether things like base_url, message_factory, etc. should be able to
@@ -295,11 +266,13 @@ interfaces.
* Marked deprecation_proxy() as internal
* Test server is now a collection of static methods on a class
-## 4.0.0-rc.1 - 2014-03-15
+4.0.0-rc.1 (2014-03-15)
+-----------------------
* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
-## 3.8.1 - 2014-01-28
+3.8.1 (2014-01-28)
+------------------
* Bug: Always using GET requests when redirecting from a 303 response
* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in
@@ -317,7 +290,8 @@ interfaces.
* Now properly escaping the regular expression delimiter when matching Cookie domains.
* Network access is now disabled when loading XML documents
-## 3.8.0 - 2013-12-05
+3.8.0 (2013-12-05)
+------------------
* Added the ability to define a POST name for a file
* JSON response parsing now properly walks additionalProperties
@@ -337,7 +311,8 @@ interfaces.
* Various fixes to the AsyncPlugin
* Cleaned up build scripts
-## 3.7.4 - 2013-10-02
+3.7.4 (2013-10-02)
+------------------
* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430)
* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp
@@ -347,7 +322,8 @@ interfaces.
* Updated the bundled cacert.pem (#419)
* OauthPlugin now supports adding authentication to headers or query string (#425)
-## 3.7.3 - 2013-09-08
+3.7.3 (2013-09-08)
+------------------
* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and
`CommandTransferException`.
@@ -363,7 +339,8 @@ interfaces.
* Bug fix: Properly parsing headers that contain commas contained in quotes
* Bug fix: mimetype guessing based on a filename is now case-insensitive
-## 3.7.2 - 2013-08-02
+3.7.2 (2013-08-02)
+------------------
* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander
See https://github.com/guzzle/guzzle/issues/371
@@ -378,7 +355,8 @@ interfaces.
https://github.com/guzzle/guzzle/pull/380
* cURL multi cleanup and optimizations
-## 3.7.1 - 2013-07-05
+3.7.1 (2013-07-05)
+------------------
* Bug fix: Setting default options on a client now works
* Bug fix: Setting options on HEAD requests now works. See #352
@@ -393,7 +371,8 @@ interfaces.
* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails
* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
-## 3.7.0 - 2013-06-10
+3.7.0 (2013-06-10)
+------------------
* See UPGRADING.md for more information on how to upgrade.
* Requests now support the ability to specify an array of $options when creating a request to more easily modify a
@@ -477,7 +456,8 @@ interfaces.
CanCacheStrategyInterface $canCache = null)`
* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
-## 3.6.0 - 2013-05-29
+3.6.0 (2013-05-29)
+------------------
* ServiceDescription now implements ToArrayInterface
* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters
@@ -514,7 +494,8 @@ interfaces.
* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
* Added the ability to cast Model objects to a string to view debug information.
-## 3.5.0 - 2013-05-13
+3.5.0 (2013-05-13)
+------------------
* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times
* Bug: Better cleanup of one-time events accross the board (when an event is meant to fire once, it will now remove
@@ -536,12 +517,14 @@ interfaces.
and responses that are sent over the wire
* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects
-## 3.4.3 - 2013-04-30
+3.4.3 (2013-04-30)
+------------------
* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response
* Added a check to re-extract the temp cacert bundle from the phar before sending each request
-## 3.4.2 - 2013-04-29
+3.4.2 (2013-04-29)
+------------------
* Bug fix: Stream objects now work correctly with "a" and "a+" modes
* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present
@@ -556,7 +539,8 @@ interfaces.
* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send)
* Configuration loading now allows remote files
-## 3.4.1 - 2013-04-16
+3.4.1 (2013-04-16)
+------------------
* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti
handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost.
@@ -569,7 +553,8 @@ interfaces.
* Added support for oauth_verifier in OAuth signatures
* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection
-## 3.4.0 - 2013-04-11
+3.4.0 (2013-04-11)
+------------------
* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
@@ -599,7 +584,8 @@ interfaces.
POST fields or files (the latter is only used when emulating a form POST in the browser).
* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest
-## 3.3.1 - 2013-03-10
+3.3.1 (2013-03-10)
+------------------
* Added the ability to create PHP streaming responses from HTTP requests
* Bug fix: Running any filters when parsing response headers with service descriptions
@@ -610,7 +596,8 @@ interfaces.
* RequestFactory::create() now uses the key of a POST file when setting the POST file name
* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set
-## 3.3.0 - 2013-03-03
+3.3.0 (2013-03-03)
+------------------
* A large number of performance optimizations have been made
* Bug fix: Added 'wb' as a valid write mode for streams
@@ -634,7 +621,8 @@ interfaces.
* Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error
* Debug headers can now added to cached response in the CachePlugin
-## 3.2.0 - 2013-02-14
+3.2.0 (2013-02-14)
+------------------
* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients.
* URLs with no path no longer contain a "/" by default
@@ -653,7 +641,8 @@ interfaces.
* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded
* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives
-## 3.1.2 - 2013-01-27
+3.1.2 (2013-01-27)
+------------------
* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the
response body. For example, the XmlVisitor now parses the XML response into an array in the before() method.
@@ -662,13 +651,15 @@ interfaces.
* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse()
* Setting default headers on a client after setting the user-agent will not erase the user-agent setting
-## 3.1.1 - 2013-01-20
+3.1.1 (2013-01-20)
+------------------
* Adding wildcard support to Guzzle\Common\Collection::getPath()
* Adding alias support to ServiceBuilder configs
* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface
-## 3.1.0 - 2013-01-12
+3.1.0 (2013-01-12)
+------------------
* BC: CurlException now extends from RequestException rather than BadResponseException
* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse()
@@ -685,20 +676,23 @@ interfaces.
* Added `extends` attributes to service description parameters
* Added getModels to ServiceDescriptionInterface
-## 3.0.7 - 2012-12-19
+3.0.7 (2012-12-19)
+------------------
* Fixing phar detection when forcing a cacert to system if null or true
* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()`
* Cleaning up `Guzzle\Common\Collection::inject` method
* Adding a response_body location to service descriptions
-## 3.0.6 - 2012-12-09
+3.0.6 (2012-12-09)
+------------------
* CurlMulti performance improvements
* Adding setErrorResponses() to Operation
* composer.json tweaks
-## 3.0.5 - 2012-11-18
+3.0.5 (2012-11-18)
+------------------
* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin
* Bug: Response body can now be a string containing "0"
@@ -708,7 +702,8 @@ interfaces.
* DefaultRequestSerializer now supports array URI parameter values for URI template expansion
* Added better mimetype guessing to requests and post files
-## 3.0.4 - 2012-11-11
+3.0.4 (2012-11-11)
+------------------
* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value
* Bug: Cookies can now be added that have a name, domain, or value set to "0"
@@ -719,7 +714,8 @@ interfaces.
* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies
* Added the ability to create any sort of hash for a stream rather than just an MD5 hash
-## 3.0.3 - 2012-11-04
+3.0.3 (2012-11-04)
+------------------
* Implementing redirects in PHP rather than cURL
* Added PECL URI template extension and using as default parser if available
@@ -728,20 +724,23 @@ interfaces.
* Adding ToArrayInterface throughout library
* Fixing OauthPlugin to create unique nonce values per request
-## 3.0.2 - 2012-10-25
+3.0.2 (2012-10-25)
+------------------
* Magic methods are enabled by default on clients
* Magic methods return the result of a command
* Service clients no longer require a base_url option in the factory
* Bug: Fixed an issue with URI templates where null template variables were being expanded
-## 3.0.1 - 2012-10-22
+3.0.1 (2012-10-22)
+------------------
* Models can now be used like regular collection objects by calling filter, map, etc.
* Models no longer require a Parameter structure or initial data in the constructor
* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator`
-## 3.0.0 - 2012-10-15
+3.0.0 (2012-10-15)
+------------------
* Rewrote service description format to be based on Swagger
* Now based on JSON schema
@@ -773,11 +772,13 @@ interfaces.
* Cleaning up Collection class and removing default values from the get method
* Fixed ZF2 cache adapters
-## 2.8.8 - 2012-10-15
+2.8.8 (2012-10-15)
+------------------
* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did
-## 2.8.7 - 2012-09-30
+2.8.7 (2012-09-30)
+------------------
* Bug: Fixed config file aliases for JSON includes
* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests
@@ -791,7 +792,8 @@ interfaces.
* Added the ability to remove POST fields from OAuth signatures
* OAuth plugin now supports 2-legged OAuth
-## 2.8.6 - 2012-09-05
+2.8.6 (2012-09-05)
+------------------
* Added the ability to modify and build service descriptions
* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command
@@ -805,7 +807,8 @@ interfaces.
* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like
'_default' with a default JSON configuration file.
-## 2.8.5 - 2012-08-29
+2.8.5 (2012-08-29)
+------------------
* Bug: Suppressed empty arrays from URI templates
* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching
@@ -813,7 +816,8 @@ interfaces.
* AbstractCommand commands are now invokable
* Added a way to get the data used when signing an Oauth request before a request is sent
-## 2.8.4 - 2012-08-15
+2.8.4 (2012-08-15)
+------------------
* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin
* 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.
@@ -827,7 +831,8 @@ interfaces.
* Added the ability of the MockPlugin to consume mocked request bodies
* LogPlugin now exposes request and response objects in the extras array
-## 2.8.3 - 2012-07-30
+2.8.3 (2012-07-30)
+------------------
* Bug: Fixed a case where empty POST requests were sent as GET requests
* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
@@ -837,7 +842,8 @@ interfaces.
* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
-## 2.8.2 - 2012-07-24
+2.8.2 (2012-07-24)
+------------------
* Bug: Query string values set to 0 are no longer dropped from the query string
* Bug: A Collection object is no longer created each time a call is made to ``Guzzle\Service\Command\AbstractCommand::getRequestHeaders()``
@@ -845,12 +851,14 @@ interfaces.
* QueryString and Collection performance improvements
* Allowing dot notation for class paths in filters attribute of a service descriptions
-## 2.8.1 - 2012-07-16
+2.8.1 (2012-07-16)
+------------------
* Loosening Event Dispatcher dependency
* POST redirects can now be customized using CURLOPT_POSTREDIR
-## 2.8.0 - 2012-07-15
+2.8.0 (2012-07-15)
+------------------
* BC: Guzzle\Http\Query
* Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl)
@@ -863,7 +871,8 @@ interfaces.
* Cookies are no longer URL decoded by default
* Bug: URI template variables set to null are no longer expanded
-## 2.7.2 - 2012-07-02
+2.7.2 (2012-07-02)
+------------------
* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser.
* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty()
@@ -873,12 +882,14 @@ interfaces.
* Allowing deeply nested arrays for composite variables in URI templates
* Batch divisors can now return iterators or arrays
-## 2.7.1 - 2012-06-26
+2.7.1 (2012-06-26)
+------------------
* Minor patch to update version number in UA string
* Updating build process
-## 2.7.0 - 2012-06-25
+2.7.0 (2012-06-25)
+------------------
* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
* BC: Removed magic setX methods from commands
@@ -895,7 +906,8 @@ interfaces.
* Fixed some tests so that they pass more reliably
* Added Guzzle\Common\Log\ArrayLogAdapter
-## 2.6.6 - 2012-06-10
+2.6.6 (2012-06-10)
+------------------
* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin
* BC: Removing Guzzle\Service\Command\CommandSet
@@ -905,7 +917,8 @@ interfaces.
* Adding result_type, result_doc, deprecated, and doc_url to service descriptions
* Bug: Changed the default cookie header casing back to 'Cookie'
-## 2.6.5 - 2012-06-03
+2.6.5 (2012-06-03)
+------------------
* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource()
* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from
@@ -917,7 +930,8 @@ interfaces.
* Adding getCookies() to request interface.
* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber()
-## 2.6.4 - 2012-05-30
+2.6.4 (2012-05-30)
+------------------
* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class.
* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand
@@ -934,7 +948,8 @@ interfaces.
* Allowing the result of a command object to be changed
* Parsing location and type sub values when instantiating a service description rather than over and over at runtime
-## 2.6.3 - 2012-05-23
+2.6.3 (2012-05-23)
+------------------
* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options.
* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields.
@@ -948,11 +963,13 @@ interfaces.
* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate.
* CS updates
-## 2.6.2 - 2012-05-19
+2.6.2 (2012-05-19)
+------------------
* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method.
-## 2.6.1 - 2012-05-19
+2.6.1 (2012-05-19)
+------------------
* [BC] Removing 'path' support in service descriptions. Use 'uri'.
* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache.
@@ -963,7 +980,8 @@ interfaces.
* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored.
* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible.
-## 2.6.0 - 2012-05-15
+2.6.0 (2012-05-15)
+------------------
* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder
* [BC] Executing a Command returns the result of the command rather than the command
@@ -991,7 +1009,8 @@ interfaces.
* Adding the ability to include other service builder config files from within XML and JSON files
* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
-## 2.5.0 - 2012-05-08
+2.5.0 (2012-05-08)
+------------------
* Major performance improvements
* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated.
diff --git a/core/vendor/guzzlehttp/guzzle/Makefile b/core/vendor/guzzlehttp/guzzle/Makefile
index 69bf327..b8188d2 100644
--- a/core/vendor/guzzlehttp/guzzle/Makefile
+++ b/core/vendor/guzzlehttp/guzzle/Makefile
@@ -29,7 +29,7 @@ view-docs:
tag:
$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
@echo Tagging $(TAG)
- chag update $(TAG)
+ chag update -m '$(TAG) ()'
sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/ClientInterface.php
php -l src/ClientInterface.php
git add -A
@@ -45,6 +45,6 @@ package: burgomaster
burgomaster:
mkdir -p build/artifacts
- curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.2/src/Burgomaster.php > build/artifacts/Burgomaster.php
+ curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.1/src/Burgomaster.php > build/artifacts/Burgomaster.php
.PHONY: docs burgomaster
diff --git a/core/vendor/guzzlehttp/guzzle/README.md b/core/vendor/guzzlehttp/guzzle/README.md
index 9df6981..90e163b 100644
--- a/core/vendor/guzzlehttp/guzzle/README.md
+++ b/core/vendor/guzzlehttp/guzzle/README.md
@@ -52,10 +52,14 @@ The recommended way to install Guzzle is through
curl -sS https://getcomposer.org/installer | php
```
-Next, run the Composer command to install the latest stable version of Guzzle:
+Next, update your project's composer.json file to include Guzzle:
-```bash
-composer require guzzlehttp/guzzle
+```javascript
+{
+ "require": {
+ "guzzlehttp/guzzle": "~5.0"
+ }
+}
```
After installing, you need to require Composer's autoloader:
diff --git a/core/vendor/guzzlehttp/guzzle/composer.json b/core/vendor/guzzlehttp/guzzle/composer.json
index e9615a0..43804ff 100644
--- a/core/vendor/guzzlehttp/guzzle/composer.json
+++ b/core/vendor/guzzlehttp/guzzle/composer.json
@@ -33,7 +33,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-ring": "5.0-dev"
}
}
}
diff --git a/core/vendor/guzzlehttp/guzzle/docs/events.rst b/core/vendor/guzzlehttp/guzzle/docs/events.rst
index 4dae96b..fc84907 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/events.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/events.rst
@@ -202,12 +202,12 @@ priority of the listener (as shown in the ``before`` listener in the example).
];
}
- public function onBefore(BeforeEvent $event, $name)
+ public function onBefore(BeforeEvent $event, $name, EmitterInterface $emitter)
{
echo 'Before!';
}
- public function onComplete(CompleteEvent $event, $name)
+ public function onComplete(CompleteEvent $event, $name, EmitterInterface $emitter)
{
echo 'Complete!';
}
diff --git a/core/vendor/guzzlehttp/guzzle/docs/faq.rst b/core/vendor/guzzlehttp/guzzle/docs/faq.rst
index 8457c7e..0647f69 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/faq.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/faq.rst
@@ -97,7 +97,7 @@ exception.
.. code-block:: php
- $request = $client->createRequest('GET', ['future' => true]);
+ $request = $client->createRequest('GET', ['future' => true']);
$client->send($request)->then(function ($response) {
echo 'Got a response! ' . $response;
});
@@ -107,7 +107,7 @@ of a response.
.. code-block:: php
- $request = $client->createRequest('GET', ['future' => true]);
+ $request = $client->createRequest('GET', ['future' => true']);
$futureResponse = $client->send($request);
$futureResponse->wait();
diff --git a/core/vendor/guzzlehttp/guzzle/docs/handlers.rst b/core/vendor/guzzlehttp/guzzle/docs/handlers.rst
index d452003..af0b923 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/handlers.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/handlers.rst
@@ -38,6 +38,6 @@ up to the RingPHP project using a very simple bridge class
Creating a handler
------------------
-See the `RingPHP <http://ringphp.readthedocs.org>`_ project
+See the `RingPHP <http://guzzle-ring.readthedocs.org>`_ project
documentation for more information on creating custom handlers that can be
used with Guzzle clients.
diff --git a/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
index 4f6ad26..d750e02 100644
--- a/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
+++ b/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
@@ -11,7 +11,7 @@ use GuzzleHttp\Message\ResponseInterface;
*/
interface ClientInterface extends HasEmitterInterface
{
- const VERSION = '5.0.3';
+ const VERSION = '5.0.0';
/**
* Create and return a new {@see RequestInterface} object.
diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
index 9e4a90f..b6c7966 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
@@ -2,7 +2,6 @@
namespace GuzzleHttp\Event;
use GuzzleHttp\Message\ResponseInterface;
-use GuzzleHttp\Ring\Future\FutureInterface;
/**
* Event that contains transfer statistics, and can be intercepted.
@@ -28,23 +27,13 @@ abstract class AbstractTransferEvent extends AbstractRequestEvent
}
/**
- * Returns true/false if a response is available.
- *
- * @return bool
- */
- public function hasResponse()
- {
- return !($this->transaction->response instanceof FutureInterface);
- }
-
- /**
- * Get the response.
+ * Get the response
*
* @return ResponseInterface|null
*/
public function getResponse()
{
- return $this->hasResponse() ? $this->transaction->response : null;
+ return $this->transaction->response;
}
/**
diff --git a/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php b/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
index f81d248..293e217 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
@@ -70,7 +70,7 @@ class RequestException extends TransferException
return new self('Error completing request', $request, null, $previous);
}
- $level = floor($response->getStatusCode() / 100);
+ $level = $response->getStatusCode()[0];
if ($level == '4') {
$label = 'Client error response';
$className = __NAMESPACE__ . '\\ClientException';
diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/Response.php b/core/vendor/guzzlehttp/guzzle/src/Message/Response.php
index 42e10e6..1a7319d 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Message/Response.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Message/Response.php
@@ -83,7 +83,7 @@ class Response extends AbstractMessage implements ResponseInterface
private $effectiveUrl;
/**
- * @param int|string $statusCode The response status code (e.g. 200)
+ * @param string $statusCode The response status code (e.g. 200)
* @param array $headers The response headers
* @param StreamInterface $body The body of the response
* @param array $options Response message options
@@ -96,7 +96,7 @@ class Response extends AbstractMessage implements ResponseInterface
StreamInterface $body = null,
array $options = []
) {
- $this->statusCode = (int) $statusCode;
+ $this->statusCode = (string) $statusCode;
$this->handleOptions($options);
// Assume a reason phrase if one was not applied as an option
@@ -122,7 +122,7 @@ class Response extends AbstractMessage implements ResponseInterface
public function setStatusCode($code)
{
- return $this->statusCode = (int) $code;
+ return $this->statusCode = $code;
}
public function getReasonPhrase()
diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php b/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
index c0ae9be..d673655 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
@@ -12,14 +12,14 @@ interface ResponseInterface extends MessageInterface
* The Status-Code is a 3-digit integer result code of the server's attempt
* to understand and satisfy the request.
*
- * @return int Status code.
+ * @return integer Status code.
*/
public function getStatusCode();
/**
* Sets the status code of this response.
*
- * @param int $code The 3-digit integer result code to set.
+ * @param integer $code The 3-digit integer result code to set.
*/
public function setStatusCode($code);
diff --git a/core/vendor/guzzlehttp/guzzle/src/Pool.php b/core/vendor/guzzlehttp/guzzle/src/Pool.php
index e95ab09..d1f4607 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Pool.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Pool.php
@@ -127,22 +127,6 @@ class Pool implements FutureInterface
return new BatchResults($hash);
}
- /**
- * Creates a Pool and immediately sends the requests.
- *
- * @param ClientInterface $client Client used to send the requests
- * @param array|\Iterator $requests Requests to send in parallel
- * @param array $options Passes through the options available in
- * {@see GuzzleHttp\Pool::__construct}
- */
- public static function send(
- ClientInterface $client,
- $requests,
- array $options = []
- ) {
- (new self($client, $requests, $options))->wait();
- }
-
public function wait()
{
if ($this->isRealized) {
diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php b/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
index 1149e62..d6bc46b 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
@@ -101,8 +101,8 @@ class MultipartBody implements StreamInterface
$stream->addStream(Stream::factory("\r\n"));
}
- // Add the trailing boundary with CRLF
- $stream->addStream(Stream::factory("--{$this->boundary}--\r\n"));
+ // Add the trailing boundary
+ $stream->addStream(Stream::factory("--{$this->boundary}--"));
return $stream;
}
diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php b/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
index ed14d1f..649350c 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
@@ -38,11 +38,8 @@ class PostBody implements PostBodyInterface
'Content-Type',
'multipart/form-data; boundary=' . $this->getBody()->getBoundary()
);
- } elseif ($this->fields && !$request->hasHeader('Content-Type')) {
- $request->setHeader(
- 'Content-Type',
- 'application/x-www-form-urlencoded'
- );
+ } elseif ($this->fields) {
+ $request->setHeader('Content-Type', 'application/x-www-form-urlencoded');
}
if ($size = $this->getSize()) {
diff --git a/core/vendor/guzzlehttp/guzzle/src/Query.php b/core/vendor/guzzlehttp/guzzle/src/Query.php
index d053def..862c0e5 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Query.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Query.php
@@ -9,8 +9,9 @@ class Query extends Collection
const RFC3986 = 'RFC3986';
const RFC1738 = 'RFC1738';
- /** @var callable Encoding function */
- private $encoding = 'rawurlencode';
+ /** @var bool URL encode fields and values */
+ private $encoding = self::RFC3986;
+
/** @var callable */
private $aggregator;
@@ -74,16 +75,27 @@ class Query extends Collection
$result = '';
$aggregator = $this->aggregator;
- $encoder = $this->encoding;
foreach ($aggregator($this->data) as $key => $values) {
foreach ($values as $value) {
if ($result) {
$result .= '&';
}
- $result .= $encoder($key);
- if ($value !== null) {
- $result .= '=' . $encoder($value);
+ if ($this->encoding == self::RFC1738) {
+ $result .= urlencode($key);
+ if ($value !== null) {
+ $result .= '=' . urlencode($value);
+ }
+ } elseif ($this->encoding == self::RFC3986) {
+ $result .= rawurlencode($key);
+ if ($value !== null) {
+ $result .= '=' . rawurlencode($value);
+ }
+ } else {
+ $result .= $key;
+ if ($value !== null) {
+ $result .= '=' . $value;
+ }
}
}
}
@@ -117,18 +129,10 @@ class Query extends Collection
*/
public function setEncodingType($type)
{
- switch ($type) {
- case self::RFC3986:
- $this->encoding = 'rawurlencode';
- break;
- case self::RFC1738:
- $this->encoding = 'urlencode';
- break;
- case false:
- $this->encoding = function ($v) { return $v; };
- break;
- default:
- throw new \InvalidArgumentException('Invalid URL encoding type');
+ if ($type === false || $type === self::RFC1738 || $type === self::RFC3986) {
+ $this->encoding = $type;
+ } else {
+ throw new \InvalidArgumentException('Invalid URL encoding type');
}
}
diff --git a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php b/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
index 12e3c70..88af9ce 100644
--- a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
+++ b/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
@@ -87,8 +87,8 @@ class RingBridge
callable $fsm
) {
$trans->state = 'complete';
- $trans->transferInfo = isset($response['transfer_stats'])
- ? $response['transfer_stats'] : [];
+ $trans->transferInfo = isset($response['transfer_info'])
+ ? $response['transfer_info'] : [];
if (!empty($response['status'])) {
$options = [];
diff --git a/core/vendor/guzzlehttp/guzzle/src/Url.php b/core/vendor/guzzlehttp/guzzle/src/Url.php
index 95ec433..497234f 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Url.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Url.php
@@ -1,8 +1,6 @@
<?php
namespace GuzzleHttp;
-use GuzzleHttp\Ring\Core;
-
/**
* Parses and generates URLs based on URL parts
*/
@@ -16,9 +14,8 @@ class Url
private $path = '';
private $fragment;
private static $defaultPorts = ['http' => 80, 'https' => 443, 'ftp' => 21];
- private static $pathPattern = '/[^a-zA-Z0-9\-\._~!\$&\'\(\)\*\+,;=%:@\/]+|%(?![A-Fa-f0-9]{2})/';
- private static $queryPattern = '/[^a-zA-Z0-9\-\._~!\$\'\(\)\*\+,;%:@\/\?=&]+|%(?![A-Fa-f0-9]{2})/';
- /** @var Query|string Query part of the URL */
+
+ /** @var Query Query part of the URL */
private $query;
/**
@@ -31,9 +28,9 @@ class Url
*/
public static function fromString($url)
{
- static $defaults = ['scheme' => null, 'host' => null,
+ static $defaults = array('scheme' => null, 'host' => null,
'path' => null, 'port' => null, 'query' => null,
- 'user' => null, 'pass' => null, 'fragment' => null];
+ 'user' => null, 'pass' => null, 'fragment' => null);
if (false === ($parts = parse_url($url))) {
throw new \InvalidArgumentException('Unable to parse malformed '
@@ -119,14 +116,14 @@ class Url
/**
* Create a new URL from URL parts
*
- * @param string $scheme Scheme of the URL
- * @param string $host Host of the URL
- * @param string $username Username of the URL
- * @param string $password Password of the URL
- * @param int $port Port of the URL
- * @param string $path Path of the URL
+ * @param string $scheme Scheme of the URL
+ * @param string $host Host of the URL
+ * @param string $username Username of the URL
+ * @param string $password Password of the URL
+ * @param int $port Port of the URL
+ * @param string $path Path of the URL
* @param Query|array|string $query Query string of the URL
- * @param string $fragment Fragment of the URL
+ * @param string $fragment Fragment of the URL
*/
public function __construct(
$scheme,
@@ -144,11 +141,11 @@ class Url
$this->username = $username;
$this->password = $password;
$this->fragment = $fragment;
-
- if ($query) {
+ if (!$query) {
+ $this->query = new Query();
+ } else {
$this->setQuery($query);
}
-
$this->setPath($path);
}
@@ -157,9 +154,7 @@ class Url
*/
public function __clone()
{
- if ($this->query instanceof Query) {
- $this->query = clone $this->query;
- }
+ $this->query = clone $this->query;
}
/**
@@ -227,9 +222,8 @@ class Url
public function setScheme($scheme)
{
// Remove the default port if one is specified
- if ($this->port
- && isset(self::$defaultPorts[$this->scheme])
- && self::$defaultPorts[$this->scheme] == $this->port
+ if ($this->port && isset(self::$defaultPorts[$this->scheme]) &&
+ self::$defaultPorts[$this->scheme] == $this->port
) {
$this->port = null;
}
@@ -277,15 +271,15 @@ class Url
}
/**
- * Set the path part of the URL.
- *
- * The provided URL is URL encoded as necessary.
+ * Set the path part of the URL
*
* @param string $path Path string to set
*/
public function setPath($path)
{
- $this->path = self::encodePath($path);
+ static $search = [' ', '?'];
+ static $replace = ['%20', '%3F'];
+ $this->path = str_replace($search, $replace, $path);
}
/**
@@ -417,52 +411,29 @@ class Url
*/
public function getQuery()
{
- // Convert the query string to a query object if not already done.
- if (!$this->query instanceof Query) {
- $this->query = $this->query === null
- ? new Query()
- : Query::fromString($this->query);
- }
-
return $this->query;
}
/**
- * Set the query part of the URL.
- *
- * You may provide a query string as a string and pass $rawString as true
- * to provide a query string that is not parsed until a call to getQuery()
- * is made. Setting a raw query string will still encode invalid characters
- * in a query string.
+ * Set the query part of the URL
*
* @param Query|string|array $query Query string value to set. Can
* be a string that will be parsed into a Query object, an array
* of key value pairs, or a Query object.
- * @param bool $rawString Set to true when providing a raw query string.
*
* @throws \InvalidArgumentException
*/
- public function setQuery($query, $rawString = false)
+ public function setQuery($query)
{
if ($query instanceof Query) {
$this->query = $query;
} elseif (is_string($query)) {
- if (!$rawString) {
- $this->query = Query::fromString($query);
- } else {
- // Ensure the query does not have illegal characters.
- $this->query = preg_replace_callback(
- self::$queryPattern,
- [__CLASS__, 'encodeMatch'],
- $query
- );
- }
-
+ $this->query = Query::fromString($query);
} elseif (is_array($query)) {
$this->query = new Query($query);
} else {
throw new \InvalidArgumentException('Query must be a Query, '
- . 'array, or string. Got ' . Core::describeType($query));
+ . 'array, or string. ' . gettype($query) . ' provided.');
}
}
@@ -520,7 +491,16 @@ class Url
// Passing a URL with a scheme overrides everything
if ($parts['scheme']) {
- return clone $url;
+ return new static(
+ $parts['scheme'],
+ $parts['host'],
+ $parts['user'],
+ $parts['pass'],
+ $parts['port'],
+ $parts['path'],
+ clone $parts['query'],
+ $parts['fragment']
+ );
}
// Setting a host overrides the entire rest of the URL
@@ -532,9 +512,7 @@ class Url
$parts['pass'],
$parts['port'],
$parts['path'],
- $parts['query'] instanceof Query
- ? clone $parts['query']
- : $parts['query'],
+ clone $parts['query'],
$parts['fragment']
);
}
@@ -542,7 +520,7 @@ class Url
if (!$parts['path'] && $parts['path'] !== '0') {
// The relative URL has no path, so check if it is just a query
$path = $this->path ?: '';
- $query = $parts['query'] ?: $this->query;
+ $query = count($parts['query']) ? $parts['query'] : $this->query;
} else {
$query = $parts['query'];
if ($parts['path'][0] == '/' || !$this->path) {
@@ -563,7 +541,7 @@ class Url
$this->password,
$this->port,
$path,
- $query instanceof Query ? clone $query : $query,
+ clone $query,
$parts['fragment']
);
@@ -573,23 +551,4 @@ class Url
return $result;
}
-
- /**
- * Encodes the path part of a URL without double-encoding percent-encoded
- * key value pairs.
- *
- * @param string $path Path to encode
- *
- * @return string
- */
- public static function encodePath($path)
- {
- static $cb = [__CLASS__, 'encodeMatch'];
- return preg_replace_callback(self::$pathPattern, $cb, $path);
- }
-
- private static function encodeMatch(array $match)
- {
- return rawurlencode($match[0]);
- }
}
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
index ca3b5ba..6f2deba 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
@@ -30,7 +30,6 @@ class AbstractTransferEventTest extends \PHPUnit_Framework_TestCase
$e = $this->getMockBuilder('GuzzleHttp\Event\AbstractTransferEvent')
->setConstructorArgs([$t])
->getMockForAbstractClass();
- $this->assertTrue($e->hasResponse());
$this->assertSame($t->response, $e->getResponse());
}
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
index 3e1fd3d..ee83e5d 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
@@ -555,7 +555,7 @@ class MessageFactoryTest extends \PHPUnit_Framework_TestCase
$client->getEmitter()->attach($history);
$client->post('http://foo.com', [
'headers' => ['Content-Type' => 'multipart/form-data'],
- 'body' => ['foo' => 'bar']
+ 'body' => ['foo' => 'bar']
]);
$this->assertContains(
'multipart/form-data; boundary=',
diff --git a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php b/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
index 788a0f8..b5c2e07 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
@@ -216,16 +216,4 @@ class PoolTest extends \PHPUnit_Framework_TestCase
$this->assertCount(1, $result);
$this->assertInstanceOf('GuzzleHttp\Exception\ClientException', $result[0]);
}
-
- public function testHasSendMethod()
- {
- $client = new Client();
- $responses = [new Response(404)];
- $history = new History();
- $client->getEmitter()->attach($history);
- $client->getEmitter()->attach(new Mock($responses));
- $requests = [$client->createRequest('GET', 'http://foo.com/baz')];
- Pool::send($client, $requests);
- $this->assertCount(1, $history);
- }
}
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php b/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
index 308f5e0..1614ec0 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
@@ -239,18 +239,4 @@ class PostBodyTest extends \PHPUnit_Framework_TestCase
$b = new PostBody();
$b->attach('foo');
}
-
- public function testDoesNotOverwriteExistingHeaderForUrlencoded()
- {
- $m = new Request('POST', 'http://foo.com', [
- 'content-type' => 'application/x-www-form-urlencoded; charset=utf-8'
- ]);
- $b = new PostBody();
- $b->setField('foo', 'bar');
- $b->applyRequestHeaders($m);
- $this->assertEquals(
- 'application/x-www-form-urlencoded; charset=utf-8',
- $m->getHeader('Content-Type')
- );
- }
}
diff --git a/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php b/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
index 8b9d344..3d2fcbb 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
@@ -155,17 +155,4 @@ class QueryTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('bar baz', $q['foo']);
$this->assertEquals('foo=bar%20baz', (string) $q);
}
-
- public function testQueryStringsAllowSlashButDoesNotDecodeWhenDisable()
- {
- $q = Query::fromString('foo=bar%2Fbaz&bam=boo%20boo', Query::RFC3986);
- $q->setEncodingType(false);
- $this->assertEquals('foo=bar/baz&bam=boo boo', (string) $q);
- }
-
- public function testQueryStringsAllowDecodingEncodingCompletelyDisabled()
- {
- $q = Query::fromString('foo=bar%2Fbaz&bam=boo boo!', false);
- $this->assertEquals('foo=bar%2Fbaz&bam=boo boo!', (string) $q);
- }
}
diff --git a/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php b/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
index efd374c..4f06bd9 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
@@ -245,7 +245,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase
$url->setScheme('https');
$this->assertEquals('https', $url->getScheme());
$url->setQuery('a=123');
- $this->assertEquals('a=123', (string) $url->getQuery());
+ $this->assertEquals('a=123', $url->getQuery());
$this->assertEquals(
'https://b:a@example.com:8080/foo/bar?a=123#abc',
(string) $url
@@ -256,12 +256,6 @@ class UrlTest extends \PHPUnit_Framework_TestCase
'https://b:a@example.com:8080/foo/bar?b=boo#abc',
(string) $url
);
-
- $url->setQuery('a%20=bar!', true);
- $this->assertEquals(
- 'https://b:a@example.com:8080/foo/bar?a%20=bar!#abc',
- (string) $url
- );
}
public function testSetQueryAcceptsArray()
@@ -280,17 +274,6 @@ class UrlTest extends \PHPUnit_Framework_TestCase
$url->setQuery(false);
}
- public function testDefersParsingAndEncodingQueryUntilNecessary()
- {
- $url = Url::fromString('http://www.test.com');
- // Note that invalid characters are encoded.
- $url->setQuery('foo#bar/', true);
- $this->assertEquals('http://www.test.com?foo%23bar/', (string) $url);
- $this->assertInternalType('string', $this->readAttribute($url, 'query'));
- $this->assertEquals('foo%23bar%2F', (string) $url->getQuery());
- $this->assertInstanceOf('GuzzleHttp\Query', $this->readAttribute($url, 'query'));
- }
-
public function urlProvider()
{
return array(
@@ -347,10 +330,4 @@ class UrlTest extends \PHPUnit_Framework_TestCase
$url->addPath('?');
$this->assertEquals('http://foo.com/baz%20bar/%3F?a=b', (string) $url);
}
-
- public function testCorrectlyEncodesPathWithoutDoubleEncoding()
- {
- $url = Url::fromString('http://foo.com/baz%20 bar:boo/baz!');
- $this->assertEquals('/baz%20%20bar:boo/baz!', $url->getPath());
- }
}