commit 28d43ff56cc30bdfb937f436c73a76686f9aac8e parent 2b8c383c1353a975da867b3302a5aa005b6d5d71 Author: MTRNord <mtrnord1@gmail.com> Date: Wed, 1 Apr 2015 19:51:39 +0200 update lib Diffstat:
39 files changed, 421 insertions(+), 268 deletions(-)
diff --git a/core/libs/OAuth2/composer.lock b/core/libs/OAuth2/composer.lock @@ -45,16 +45,16 @@ }, { "name": "guzzle/guzzle", - "version": "v3.9.2", + "version": "v3.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle3.git", - "reference": "54991459675c1a2924122afbb0e5609ade581155" + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155", - "reference": "54991459675c1a2924122afbb0e5609ade581155", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", "shasum": "" }, "require": { @@ -95,6 +95,9 @@ "zendframework/zend-cache": "2.*,<2.3", "zendframework/zend-log": "2.*,<2.3" }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, "type": "library", "extra": { "branch-alias": { @@ -122,7 +125,7 @@ "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -133,21 +136,21 @@ "rest", "web service" ], - "time": "2014-08-11 04:32:36" + "time": "2015-03-18 18:23:50" }, { "name": "symfony/event-dispatcher", - "version": "v2.6.1", + "version": "v2.6.6", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216" + "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/720fe9bca893df7ad1b4546649473b5afddf0216", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/70f7c8478739ad21e3deef0d977b38c77f1fb284", + "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284", "shasum": "" }, "require": { @@ -155,10 +158,11 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0", + "symfony/config": "~2.0,>=2.0.5", "symfony/dependency-injection": "~2.6", "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.2" + "symfony/phpunit-bridge": "~2.7", + "symfony/stopwatch": "~2.3" }, "suggest": { "symfony/dependency-injection": "", @@ -191,7 +195,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" + "time": "2015-03-13 17:37:22" } ], "packages-dev": [], diff --git a/core/libs/OAuth2/composer.phar b/core/libs/OAuth2/composer.phar Binary files differ. diff --git a/core/libs/OAuth2/vendor/autoload.php b/core/libs/OAuth2/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitde09121a469cf523ae4c0f60db189115::getLoader(); +return ComposerAutoloaderInitbd206651ff6b5e86309718eba72a1510::getLoader(); diff --git a/core/libs/OAuth2/vendor/composer/ClassLoader.php b/core/libs/OAuth2/vendor/composer/ClassLoader.php @@ -54,6 +54,8 @@ class ClassLoader private $useIncludePath = false; private $classMap = array(); + private $classMapAuthoritative = false; + public function getPrefixes() { if (!empty($this->prefixesPsr0)) { @@ -249,6 +251,27 @@ class ClassLoader } /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not @@ -299,6 +322,9 @@ class ClassLoader if (isset($this->classMap[$class])) { return $this->classMap[$class]; } + if ($this->classMapAuthoritative) { + return false; + } $file = $this->findFileWithExtension($class, '.php'); diff --git a/core/libs/OAuth2/vendor/composer/autoload_real.php b/core/libs/OAuth2/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitde09121a469cf523ae4c0f60db189115 +class ComposerAutoloaderInitbd206651ff6b5e86309718eba72a1510 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInitde09121a469cf523ae4c0f60db189115 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitde09121a469cf523ae4c0f60db189115', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitbd206651ff6b5e86309718eba72a1510', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitde09121a469cf523ae4c0f60db189115', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitbd206651ff6b5e86309718eba72a1510', 'loadClassLoader')); $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -44,7 +44,7 @@ class ComposerAutoloaderInitde09121a469cf523ae4c0f60db189115 } } -function composerRequirede09121a469cf523ae4c0f60db189115($file) +function composerRequirebd206651ff6b5e86309718eba72a1510($file) { require $file; } diff --git a/core/libs/OAuth2/vendor/composer/installed.json b/core/libs/OAuth2/vendor/composer/installed.json @@ -39,18 +39,79 @@ "description": "PHP library for common OAuth classes." }, { + "name": "symfony/event-dispatcher", + "version": "v2.6.6", + "version_normalized": "2.6.6.0", + "target-dir": "Symfony/Component/EventDispatcher", + "source": { + "type": "git", + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/70f7c8478739ad21e3deef0d977b38c77f1fb284", + "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5", + "symfony/dependency-injection": "~2.6", + "symfony/expression-language": "~2.6", + "symfony/phpunit-bridge": "~2.7", + "symfony/stopwatch": "~2.3" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2015-03-13 17:37:22", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Symfony\\Component\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "http://symfony.com" + }, + { "name": "guzzle/guzzle", - "version": "v3.9.2", - "version_normalized": "3.9.2.0", + "version": "v3.9.3", + "version_normalized": "3.9.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle3.git", - "reference": "54991459675c1a2924122afbb0e5609ade581155" + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155", - "reference": "54991459675c1a2924122afbb0e5609ade581155", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", "shasum": "" }, "require": { @@ -91,7 +152,10 @@ "zendframework/zend-cache": "2.*,<2.3", "zendframework/zend-log": "2.*,<2.3" }, - "time": "2014-08-11 04:32:36", + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, + "time": "2015-03-18 18:23:50", "type": "library", "extra": { "branch-alias": { @@ -120,7 +184,7 @@ "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -131,65 +195,5 @@ "rest", "web service" ] - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/720fe9bca893df7ad1b4546649473b5afddf0216", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.2" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com" } ] diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/.travis.yml b/core/libs/OAuth2/vendor/guzzle/guzzle/.travis.yml @@ -14,10 +14,4 @@ before_script: - composer install --no-interaction --prefer-source --dev - ~/.nvm/nvm.sh install v0.6.14 -script: vendor/bin/phpunit - -matrix: - allow_failures: - - php: 5.6 - - php: hhvm - fast_finish: true +script: composer test diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/CHANGELOG.md b/core/libs/OAuth2/vendor/guzzle/guzzle/CHANGELOG.md @@ -1,22 +1,25 @@ -CHANGELOG -========= +# CHANGELOG -3.9.2 (2014-09-10) ------------------- +## 3.9.3 - 2015-03-18 + +* Ensuring Content-Length is not stripped from a request when it is `0`. +* Added more information to stream wrapper exceptions. +* Message parser will no longer throw warnings for malformed messages. +* Giving a valid cache TTL when max-age is 0. + +## 3.9.2 - 2014-09-10 * Retrying "Connection died, retrying a fresh connect" curl errors. * Automatically extracting the cacert from the phar in client constructor. * Added EntityBody support for OPTIONS requests. -3.9.1 (2014-05-07) ------------------- +## 3.9.1 - 2014-05-07 * Added a fix to ReadLimitEntityBody to ensure it doesn't infinitely loop. * Added a fix to the stream checksum function so that when the first read returns a falsey value, it still continues to consume the stream until EOF. -3.9.0 (2014-04-23) ------------------- +## 3.9.0 - 2014-04-23 * `null`, `false`, and `"_guzzle_blank_"` all now serialize as an empty value with no trailing "=". See dc1d824277. @@ -34,8 +37,7 @@ CHANGELOG * OAuth parameters are now sorted using lexicographical byte value ordering * Fixing invalid usage of an out of range PHP feature in the ErrorResponsePlugin -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 @@ -53,8 +55,7 @@ CHANGELOG * 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 @@ -74,8 +75,7 @@ CHANGELOG * 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 @@ -85,8 +85,7 @@ CHANGELOG * 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`. @@ -102,8 +101,7 @@ CHANGELOG * 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 @@ -118,8 +116,7 @@ CHANGELOG 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 @@ -134,8 +131,7 @@ CHANGELOG * 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 @@ -219,8 +215,7 @@ CHANGELOG 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 @@ -257,8 +252,7 @@ CHANGELOG * `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 @@ -280,14 +274,12 @@ CHANGELOG 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 @@ -302,8 +294,7 @@ CHANGELOG * 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. @@ -316,8 +307,7 @@ CHANGELOG * 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 @@ -347,8 +337,7 @@ CHANGELOG 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 @@ -359,8 +348,7 @@ CHANGELOG * 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 @@ -384,8 +372,7 @@ CHANGELOG * 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 @@ -404,8 +391,7 @@ CHANGELOG * 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. @@ -414,15 +400,13 @@ CHANGELOG * 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() @@ -439,23 +423,20 @@ CHANGELOG * 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" @@ -465,8 +446,7 @@ CHANGELOG * 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" @@ -477,8 +457,7 @@ CHANGELOG * 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 @@ -487,23 +466,20 @@ CHANGELOG * 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 @@ -535,13 +511,11 @@ CHANGELOG * 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 @@ -555,8 +529,7 @@ CHANGELOG * 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 @@ -570,8 +543,7 @@ CHANGELOG * 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 @@ -579,8 +551,7 @@ CHANGELOG * 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. @@ -594,8 +565,7 @@ CHANGELOG * 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 @@ -605,8 +575,7 @@ CHANGELOG * 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()`` @@ -614,14 +583,12 @@ CHANGELOG * 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) @@ -634,8 +601,7 @@ CHANGELOG * 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() @@ -645,14 +611,12 @@ CHANGELOG * 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 @@ -669,8 +633,7 @@ CHANGELOG * 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 @@ -680,8 +643,7 @@ CHANGELOG * 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 @@ -693,8 +655,7 @@ CHANGELOG * 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 @@ -711,8 +672,7 @@ CHANGELOG * 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. @@ -726,13 +686,11 @@ CHANGELOG * 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. @@ -743,8 +701,7 @@ CHANGELOG * 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 @@ -772,8 +729,7 @@ CHANGELOG * 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/libs/OAuth2/vendor/guzzle/guzzle/README.md b/core/libs/OAuth2/vendor/guzzle/guzzle/README.md @@ -3,12 +3,15 @@ Guzzle, PHP HTTP client and webservice framework # This is an old version of Guzzle -This repository is for Guzzle 3.x. Guzzle 4.x, the new version of Guzzle, has +This repository is for Guzzle 3.x. Guzzle 5.x, the new version of Guzzle, has been released and is available at [https://github.com/guzzle/guzzle](https://github.com/guzzle/guzzle). The -documentation for Guzzle version 4+ can be found at +documentation for Guzzle version 5+ can be found at [http://guzzlephp.org](http://guzzlephp.org). +Guzzle 3 is only maintained for bug and security fixes. Guzzle 3 will be EOL +at some point in late 2015. + ### About Guzzle 3 [](https://packagist.org/packages/guzzle/guzzle) @@ -38,3 +41,17 @@ After installing, you need to require Composer's autoloader: ```php require 'vendor/autoload.php'; ``` +## Known Issues + +1. Problem following a specific redirect: https://github.com/guzzle/guzzle/issues/385. + This has been fixed in Guzzle 4/5. +2. Root XML attributes not serialized in a service description: https://github.com/guzzle/guzzle3/issues/5. + This has been fixed in Guzzle 4/5. +3. Accept-Encoding not preserved when following redirect: https://github.com/guzzle/guzzle3/issues/9 + Fixed in Guzzle 4/5. +4. String "Array" Transmitted w/ PostFiles and Duplicate Aggregator: https://github.com/guzzle/guzzle3/issues/10 + Fixed in Guzzle 4/5. +5. Recursive model references with array items: https://github.com/guzzle/guzzle3/issues/13 + Fixed in Guzzle 4/5 +6. String "Array" Transmitted w/ PostFiles and Duplicate Aggregator: https://github.com/guzzle/guzzle3/issues/10 + Fixed in Guzzle 4/5. diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/composer.json b/core/libs/OAuth2/vendor/guzzle/guzzle/composer.json @@ -1,7 +1,7 @@ { "name": "guzzle/guzzle", "type": "library", - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"], "homepage": "http://guzzlephp.org/", "license": "MIT", @@ -56,6 +56,14 @@ } }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, + + "scripts": { + "test": "phpunit" + }, + "require-dev": { "doctrine/cache": "~1.3", "symfony/class-loader": "~2.1", diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/docs/_downloads/guzzle-schema-1.0.json b/core/libs/OAuth2/vendor/guzzle/guzzle/docs/_downloads/guzzle-schema-1.0.json @@ -71,7 +71,7 @@ "type": "number", "description": "HTTP response status code of the error" }, - "phrase": { + "reason": { "type": "string", "description": "Response reason phrase or description of the error" }, diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/docs/webservice-client/guzzle-service-descriptions.rst b/core/libs/OAuth2/vendor/guzzle/guzzle/docs/webservice-client/guzzle-service-descriptions.rst @@ -99,7 +99,7 @@ endpoint and HTTP method. If an API has a ``DELETE /users/:id`` operation, a sat "errorResponses": [ { "code": 500, - "phrase": "Unexpected Error", + "reason": "Unexpected Error", "class": "string" } ], @@ -125,7 +125,7 @@ endpoint and HTTP method. If an API has a ``DELETE /users/:id`` operation, a sat "responseNotes", "string", "A description of the response returned by the operation" "responseType", "string", "The type of response that the operation creates: one of primitive, class, model, or documentation. If not specified, this value will be automatically inferred based on whether or not there is a model matching the name, if a matching class name is found, or set to 'primitive' by default." "deprecated", "boolean", "Whether or not the operation is deprecated" - "errorResponses", "array", "Errors that could occur while executing the operation. Each item of the array is an object that can contain a 'code' (HTTP response status code of the error), 'phrase' (reason phrase or description of the error), and 'class' (an exception class that will be raised when this error is encountered)" + "errorResponses", "array", "Errors that could occur while executing the operation. Each item of the array is an object that can contain a 'code' (HTTP response status code of the error), 'reason' (reason phrase or description of the error), and 'class' (an exception class that will be raised when this error is encountered)" "data", "object", "Any arbitrary data to associate with the operation" "parameters", "object containing :ref:`parameter-schema` objects", "Parameters of the operation. Parameters are used to define how input data is serialized into a HTTP request." "additionalParameters", "A single :ref:`parameter-schema` object", "Validation and serialization rules for any parameter supplied to the operation that was not explicitly defined." @@ -232,7 +232,7 @@ errorResponses ``errorResponses`` is an array containing objects that define the errors that could occur while executing the operation. Each item of the array is an object that can contain a 'code' (HTTP response status code of the error), -'phrase' (reason phrase or description of the error), and 'class' (an exception class that will be raised when this +'reason' (reason phrase or description of the error), and 'class' (an exception class that will be raised when this error is encountered). ErrorResponsePlugin @@ -246,7 +246,7 @@ checked against the list of error responses for an exact match using the followi 1. Does the errorResponse have a defined ``class``? 2. Is the errorResponse ``code`` equal to the status code of the response? -3. Is the errorResponse ``phrase`` equal to the reason phrase of the response? +3. Is the errorResponse ``reason`` equal to the reason phrase of the response? 4. Throw the exception stored in the ``class`` attribute of the errorResponse. The ``class`` attribute must point to a class that implements diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php @@ -36,6 +36,6 @@ class DoctrineCacheAdapter extends AbstractCacheAdapter public function save($id, $data, $lifeTime = false, array $options = null) { - return $this->cache->save($id, $data, $lifeTime); + return $this->cache->save($id, $data, $lifeTime !== false ? $lifeTime : 0); } } diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Common/Version.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Common/Version.php @@ -7,7 +7,7 @@ namespace Guzzle\Common; */ class Version { - const VERSION = '3.9.2'; + const VERSION = '3.9.3'; /** * @var bool Set this value to true to enable warnings for deprecated functionality use. This should be on in your diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlHandle.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlHandle.php @@ -193,7 +193,7 @@ class CurlHandle } // Add the content-length header back if it was temporarily removed - if ($tempContentLength) { + if (null !== $tempContentLength) { $request->setHeader('Content-Length', $tempContentLength); } diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php @@ -2,6 +2,8 @@ namespace Guzzle\Http; +use Guzzle\Stream\StreamInterface; + /** * EntityBody decorator used to return only a subset of an entity body */ @@ -30,7 +32,21 @@ class ReadLimitEntityBody extends AbstractEntityBodyDecorator */ public function __toString() { - return substr((string) $this->body, $this->offset, $this->limit) ?: ''; + if (!$this->body->isReadable() || + (!$this->body->isSeekable() && $this->body->isConsumed()) + ) { + return ''; + } + + $originalPos = $this->body->ftell(); + $this->body->seek($this->offset); + $data = ''; + while (!$this->feof()) { + $data .= $this->read(1048576); + } + $this->body->seek($originalPos); + + return (string) $data ?: ''; } public function isConsumed() diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem @@ -1,18 +1,21 @@ ## -## ca-bundle.crt -- Bundle of CA Root Certificates +## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Tue Apr 22 08:29:31 2014 +## Certificate data from Mozilla downloaded on: Wed Aug 13 21:49:32 2014 ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates ## file (certdata.txt). This file can be found in the mozilla source tree: -## http://mxr.mozilla.org/mozilla-release/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1 +## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt ## ## It contains the certificates in PEM format and therefore ## can be directly used with curl / libcurl / php_curl, or with ## an Apache+mod_ssl webserver for SSL client authentication. ## Just configure this file as the SSLCACertificateFile. ## +## Conversion done with mk-ca-bundle.pl verison 1.22. +## SHA1: bf2c15b3019e696660321d2227d942936dc50aa7 +## GTE CyberTrust Global Root @@ -3864,3 +3867,4 @@ TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G 3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed -----END CERTIFICATE----- + diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParser.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParser.php @@ -33,7 +33,7 @@ class MessageParser extends AbstractMessageParser 'body' => $parts['body'] ); - $parsed['request_url'] = $this->getUrlPartsFromMessage($parts['start_line'][1], $parsed); + $parsed['request_url'] = $this->getUrlPartsFromMessage(isset($parts['start_line'][1]) ? $parts['start_line'][1] : '' , $parsed); return $parsed; } diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCacheStorage.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCacheStorage.php @@ -39,11 +39,26 @@ class DefaultCacheStorage implements CacheStorageInterface public function cache(RequestInterface $request, Response $response) { $currentTime = time(); - $ttl = $request->getParams()->get('cache.override_ttl') ?: $response->getMaxAge() ?: $this->defaultTtl; + + $overrideTtl = $request->getParams()->get('cache.override_ttl'); + if ($overrideTtl) { + $ttl = $overrideTtl; + } else { + $maxAge = $response->getMaxAge(); + if ($maxAge !== null) { + $ttl = $maxAge; + } else { + $ttl = $this->defaultTtl; + } + } if ($cacheControl = $response->getHeader('Cache-Control')) { $stale = $cacheControl->getDirective('stale-if-error'); - $ttl += $stale == true ? $ttl : $stale; + if ($stale === true) { + $ttl += $ttl; + } else if (is_numeric($stale)) { + $ttl += $stale; + } } // Determine which manifest key should be used diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Service/Description/Operation.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Service/Description/Operation.php @@ -86,7 +86,7 @@ class Operation implements OperationInterface * name, if a matching PSR-0 compliant class name is found, or set to 'primitive' by default. * - deprecated: (bool) Set to true if this is a deprecated command * - errorResponses: (array) Errors that could occur when executing the command. Array of hashes, each with a - * 'code' (the HTTP response code), 'phrase' (response reason phrase or description of the + * 'code' (the HTTP response code), 'reason' (response reason phrase or description of the * error), and 'class' (a custom exception class that would be thrown if the error is * encountered). * - data: (array) Any extra data that might be used to help build or serialize the operation diff --git a/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Stream/PhpStreamRequestFactory.php b/core/libs/OAuth2/vendor/guzzle/guzzle/src/Guzzle/Stream/PhpStreamRequestFactory.php @@ -257,16 +257,24 @@ class PhpStreamRequestFactory implements StreamRequestFactoryInterface */ protected function createResource($callback) { - // Turn off error reporting while we try to initiate the request - $level = error_reporting(0); + $errors = null; + set_error_handler(function ($_, $msg, $file, $line) use (&$errors) { + $errors[] = array( + 'message' => $msg, + 'file' => $file, + 'line' => $line + ); + return true; + }); $resource = call_user_func($callback); - error_reporting($level); + restore_error_handler(); - // If the resource could not be created, then grab the last error and throw an exception - if (false === $resource) { + if (!$resource) { $message = 'Error creating resource. '; - foreach (error_get_last() as $key => $value) { - $message .= "[{$key}] {$value} "; + foreach ($errors as $err) { + foreach ($err as $key => $value) { + $message .= "[$key] $value" . PHP_EOL; + } } throw new RuntimeException(trim($message)); } diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Lazily loads listeners and subscribers from the dependency injection - * container + * container. * * @author Fabien Potencier <fabien@symfony.com> * @author Bernhard Schussek <bschussek@gmail.com> @@ -24,19 +24,22 @@ use Symfony\Component\DependencyInjection\ContainerInterface; class ContainerAwareEventDispatcher extends EventDispatcher { /** - * The container from where services are loaded + * The container from where services are loaded. + * * @var ContainerInterface */ private $container; /** - * The service IDs of the event listeners and subscribers + * The service IDs of the event listeners and subscribers. + * * @var array */ private $listenerIds = array(); /** - * The services registered as listeners + * The services registered as listeners. + * * @var array */ private $listeners = array(); @@ -52,7 +55,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher } /** - * Adds a service as event listener + * Adds a service as event listener. * * @param string $eventName Event for which the listener is added * @param array $callback The service ID of the listener service & the method @@ -97,7 +100,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher } /** - * @see EventDispatcherInterface::hasListeners + * @see EventDispatcherInterface::hasListeners() */ public function hasListeners($eventName = null) { @@ -113,7 +116,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher } /** - * @see EventDispatcherInterface::getListeners + * @see EventDispatcherInterface::getListeners() */ public function getListeners($eventName = null) { @@ -129,7 +132,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher } /** - * Adds a service as event subscriber + * Adds a service as event subscriber. * * @param string $serviceId The service ID of the subscriber service * @param string $class The service's class name (which must implement EventSubscriberInterface) diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php @@ -216,7 +216,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->dispatcher->removeListener($eventName, $listener); $info = $this->getListenerInfo($listener, $eventName); $name = isset($info['class']) ? $info['class'] : $info['type']; - $this->dispatcher->addListener($eventName, new WrappedListener($listener, $name, $this->stopwatch)); + $this->dispatcher->addListener($eventName, new WrappedListener($listener, $name, $this->stopwatch, $this)); } } @@ -224,6 +224,9 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface { $skipped = false; foreach ($this->dispatcher->getListeners($eventName) as $listener) { + if (!$listener instanceof WrappedListener) { // #12845: a new listener was added during dispatch. + continue; + } // Unwrap listener $this->dispatcher->removeListener($eventName, $listener); $this->dispatcher->addListener($eventName, $listener->getWrappedListener()); diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php @@ -25,12 +25,14 @@ class WrappedListener private $called; private $stoppedPropagation; private $stopwatch; + private $dispatcher; - public function __construct($listener, $name, Stopwatch $stopwatch) + public function __construct($listener, $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) { $this->listener = $listener; $this->name = $name; $this->stopwatch = $stopwatch; + $this->dispatcher = $dispatcher; $this->called = false; $this->stoppedPropagation = false; } @@ -56,7 +58,7 @@ class WrappedListener $e = $this->stopwatch->start($this->name, 'event_listener'); - call_user_func($this->listener, $event, $eventName, $dispatcher); + call_user_func($this->listener, $event, $eventName, $this->dispatcher ?: $dispatcher); if ($e->isStarted()) { $e->stop(); diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php @@ -91,8 +91,12 @@ class RegisterListenersPass implements CompilerPassInterface throw new \InvalidArgumentException(sprintf('The service "%s" must be public as event subscribers are lazy-loaded.', $id)); } + if ($def->isAbstract()) { + throw new \InvalidArgumentException(sprintf('The service "%s" must not be abstract as event subscribers are lazy-loaded.', $id)); + } + // We must assume that the class value has been correctly filled, even if the service is created by a factory - $class = $def->getClass(); + $class = $container->getParameterBag()->resolveValue($def->getClass()); $refClass = new \ReflectionClass($class); $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface'; diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php @@ -20,17 +20,17 @@ namespace Symfony\Component\EventDispatcher; * You can call the method stopPropagation() to abort the execution of * further listeners in your event listener. * - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Jonathan Wage <jonwage@gmail.com> - * @author Roman Borschel <roman@code-factory.org> - * @author Bernhard Schussek <bschussek@gmail.com> + * @author Guilherme Blanco <guilhermeblanco@hotmail.com> + * @author Jonathan Wage <jonwage@gmail.com> + * @author Roman Borschel <roman@code-factory.org> + * @author Bernhard Schussek <bschussek@gmail.com> * * @api */ class Event { /** - * @var bool Whether no further event listeners should be triggered + * @var bool Whether no further event listeners should be triggered */ private $propagationStopped = false; @@ -47,7 +47,8 @@ class Event /** * Returns whether further event listeners should be triggered. * - * @see Event::stopPropagation + * @see Event::stopPropagation() + * * @return bool Whether propagation was already stopped for this event. * * @api @@ -72,7 +73,7 @@ class Event } /** - * Stores the EventDispatcher that dispatches this Event + * Stores the EventDispatcher that dispatches this Event. * * @param EventDispatcherInterface $dispatcher * @@ -86,7 +87,7 @@ class Event } /** - * Returns the EventDispatcher that dispatches this Event + * Returns the EventDispatcher that dispatches this Event. * * @return EventDispatcherInterface * diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -17,13 +17,13 @@ namespace Symfony\Component\EventDispatcher; * Listeners are registered on the manager and events are dispatched through the * manager. * - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Jonathan Wage <jonwage@gmail.com> - * @author Roman Borschel <roman@code-factory.org> - * @author Bernhard Schussek <bschussek@gmail.com> - * @author Fabien Potencier <fabien@symfony.com> - * @author Jordi Boggiano <j.boggiano@seld.be> - * @author Jordan Alliot <jordan.alliot@gmail.com> + * @author Guilherme Blanco <guilhermeblanco@hotmail.com> + * @author Jonathan Wage <jonwage@gmail.com> + * @author Roman Borschel <roman@code-factory.org> + * @author Bernhard Schussek <bschussek@gmail.com> + * @author Fabien Potencier <fabien@symfony.com> + * @author Jordi Boggiano <j.boggiano@seld.be> + * @author Jordan Alliot <jordan.alliot@gmail.com> * * @api */ @@ -33,7 +33,7 @@ class EventDispatcher implements EventDispatcherInterface private $sorted = array(); /** - * @see EventDispatcherInterface::dispatch + * @see EventDispatcherInterface::dispatch() * * @api */ @@ -56,7 +56,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::getListeners + * @see EventDispatcherInterface::getListeners() */ public function getListeners($eventName = null) { @@ -78,7 +78,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::hasListeners + * @see EventDispatcherInterface::hasListeners() */ public function hasListeners($eventName = null) { @@ -86,7 +86,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::addListener + * @see EventDispatcherInterface::addListener() * * @api */ @@ -97,7 +97,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::removeListener + * @see EventDispatcherInterface::removeListener() */ public function removeListener($eventName, $listener) { @@ -113,7 +113,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::addSubscriber + * @see EventDispatcherInterface::addSubscriber() * * @api */ @@ -133,7 +133,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::removeSubscriber + * @see EventDispatcherInterface::removeSubscriber() */ public function removeSubscriber(EventSubscriberInterface $subscriber) { diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php @@ -17,10 +17,10 @@ namespace Symfony\Component\EventDispatcher; * {@link getSubscribedEvents} and registers the subscriber as a listener for all * returned events. * - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Jonathan Wage <jonwage@gmail.com> - * @author Roman Borschel <roman@code-factory.org> - * @author Bernhard Schussek <bschussek@gmail.com> + * @author Guilherme Blanco <guilhermeblanco@hotmail.com> + * @author Jonathan Wage <jonwage@gmail.com> + * @author Roman Borschel <roman@code-factory.org> + * @author Bernhard Schussek <bschussek@gmail.com> * * @api */ diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php @@ -175,7 +175,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate } /** - * IteratorAggregate for iterating over the object like an array + * IteratorAggregate for iterating over the object like an array. * * @return \ArrayIterator */ diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php @@ -20,6 +20,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface { /** * The proxied dispatcher. + * * @var EventDispatcherInterface */ private $dispatcher; diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/LICENSE b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md @@ -23,5 +23,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/EventDispatcher/ - $ composer.phar install + $ composer install $ phpunit diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php @@ -22,6 +22,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest protected function createEventDispatcher() { $container = new Container(); + return new ContainerAwareEventDispatcher($container); } diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -86,6 +86,20 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array(), $tdispatcher->getNotCalledListeners()); } + public function testGetCalledListenersNested() + { + $tdispatcher = null; + $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $dispatcher->addListener('foo', function (Event $event, $eventName, $dispatcher) use (&$tdispatcher) { + $tdispatcher = $dispatcher; + $dispatcher->dispatch('bar'); + }); + $dispatcher->addListener('bar', function (Event $event) {}); + $dispatcher->dispatch('foo'); + $this->assertSame($dispatcher, $tdispatcher); + $this->assertCount(2, $dispatcher->getCalledListeners()); + } + public function testLogger() { $logger = $this->getMock('Psr\Log\LoggerInterface'); diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php @@ -138,6 +138,58 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase $registerListenersPass = new RegisterListenersPass(); $registerListenersPass->process($container); } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The service "foo" must not be abstract as event subscribers are lazy-loaded. + */ + public function testAbstractEventSubscriber() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_subscriber', array()); + $container->register('event_dispatcher', 'stdClass'); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($container); + } + + public function testEventSubscriberResolvableClassName() + { + $container = new ContainerBuilder(); + + $container->setParameter('subscriber.class', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService'); + $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', array()); + $container->register('event_dispatcher', 'stdClass'); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($container); + + $definition = $container->getDefinition('event_dispatcher'); + $expected_calls = array( + array( + 'addSubscriberService', + array( + 'foo', + 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService', + ), + ), + ); + $this->assertSame($expected_calls, $definition->getMethodCalls()); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage You have requested a non-existent parameter "subscriber.class" + */ + public function testEventSubscriberUnresolvableClassName() + { + $container = new ContainerBuilder(); + $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', array()); + $container->register('event_dispatcher', 'stdClass'); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($container); + } } class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php @@ -60,24 +60,40 @@ class EventTest extends \PHPUnit_Framework_TestCase $this->assertTrue($this->event->isPropagationStopped()); } - public function testSetDispatcher() + /** + * @group legacy + */ + public function testLegacySetDispatcher() { + $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->event->setDispatcher($this->dispatcher); $this->assertSame($this->dispatcher, $this->event->getDispatcher()); } - public function testGetDispatcher() + /** + * @group legacy + */ + public function testLegacyGetDispatcher() { + $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->assertNull($this->event->getDispatcher()); } - public function testGetName() + /** + * @group legacy + */ + public function testLegacyGetName() { + $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->assertNull($this->event->getName()); } - public function testSetName() + /** + * @group legacy + */ + public function testLegacySetName() { + $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->event->setName('foo'); $this->assertEquals('foo', $this->event->getName()); } diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php @@ -53,7 +53,7 @@ class GenericEventTest extends \PHPUnit_Framework_TestCase } /** - * Tests Event->getArgs() + * Tests Event->getArgs(). */ public function testGetArguments() { diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json @@ -19,10 +19,11 @@ "php": ">=5.3.3" }, "require-dev": { + "symfony/phpunit-bridge": "~2.7", "symfony/dependency-injection": "~2.6", "symfony/expression-language": "~2.6", - "symfony/config": "~2.0", - "symfony/stopwatch": "~2.2", + "symfony/config": "~2.0,>=2.0.5", + "symfony/stopwatch": "~2.3", "psr/log": "~1.0" }, "suggest": { diff --git a/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist b/core/libs/OAuth2/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist @@ -6,6 +6,9 @@ colors="true" bootstrap="vendor/autoload.php" > + <php> + <ini name="error_reporting" value="-1" /> + </php> <testsuites> <testsuite name="Symfony EventDispatcher Component Test Suite"> <directory>./Tests/</directory>